mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
12a4b35506
commit
2e773ade52
1 changed files with 16 additions and 9 deletions
|
|
@ -101,17 +101,24 @@ export class Wnd {
|
||||||
target = target.parentElement;
|
target = target.parentElement;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.headersElement.addEventListener("dblclick", (event) => {
|
this.headersElement.parentElement.addEventListener("dblclick", (event) => {
|
||||||
if (window.siyuan.config.fileTree.openFilesUseCurrentTab) {
|
|
||||||
let target = event.target as HTMLElement;
|
let target = event.target as HTMLElement;
|
||||||
while (target && !target.isEqualNode(this.headersElement)) {
|
while (target && !target.isEqualNode(this.headersElement)) {
|
||||||
if (target.tagName === "LI") {
|
if (window.siyuan.config.fileTree.openFilesUseCurrentTab && target.getAttribute("data-type") === "tab-header") {
|
||||||
target.classList.remove("item--unupdate");
|
target.classList.remove("item--unupdate");
|
||||||
break;
|
break;
|
||||||
|
} else if (target.tagName === "SPAN" && target.className === "fn__flex-1" &&
|
||||||
|
isWindow() && this.headersElement.getBoundingClientRect().top <= 0) {
|
||||||
|
const currentWindow = getCurrentWindow();
|
||||||
|
if (currentWindow.isMaximized()) {
|
||||||
|
currentWindow.unmaximize();
|
||||||
|
} else {
|
||||||
|
currentWindow.maximize();
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
target = target.parentElement;
|
target = target.parentElement;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
const dragElement = this.element.querySelector(".layout-tab-container__drag") as HTMLElement;
|
const dragElement = this.element.querySelector(".layout-tab-container__drag") as HTMLElement;
|
||||||
if (!dragElement) {
|
if (!dragElement) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue