mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-16 20:18:06 +01:00
This commit is contained in:
parent
fc71c7abc2
commit
45bfec7d2f
5 changed files with 14 additions and 11 deletions
|
|
@ -700,10 +700,11 @@ export class Wnd {
|
|||
clearCounter();
|
||||
this.children.find((item, index) => {
|
||||
if (item.id === id) {
|
||||
if (item.model instanceof Custom) {
|
||||
if (item.model.beforeDestroy) {
|
||||
item.model.beforeDestroy();
|
||||
}
|
||||
if (item.model instanceof Custom && item.model.beforeDestroy) {
|
||||
item.model.beforeDestroy();
|
||||
}
|
||||
if (item.model instanceof Editor) {
|
||||
saveScroll(item.model.editor.protyle);
|
||||
}
|
||||
if (this.children.length === 1) {
|
||||
this.destroyModel(this.children[0].model);
|
||||
|
|
@ -771,7 +772,7 @@ export class Wnd {
|
|||
item.panelElement.remove();
|
||||
this.destroyModel(item.model);
|
||||
this.children.splice(index, 1);
|
||||
resizeTabs(item.headElement ? true : false);
|
||||
resizeTabs(false);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
@ -791,6 +792,7 @@ export class Wnd {
|
|||
setTitle(window.siyuan.languages.siyuanNote);
|
||||
}
|
||||
}
|
||||
saveLayout();
|
||||
/// #if !BROWSER
|
||||
webFrame.clearCache();
|
||||
ipcRenderer.send(Constants.SIYUAN_CMD, "clearCache");
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ export class Layout {
|
|||
});
|
||||
}
|
||||
addResize(child);
|
||||
resizeTabs(false);
|
||||
// https://ld246.com/article/1669858316295
|
||||
if (this.direction === "tb") {
|
||||
child.element.style.minHeight = "64px";
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ export const saveLayout = () => {
|
|||
saveCount++;
|
||||
setTimeout(() => {
|
||||
saveLayout();
|
||||
}, Constants.TIMEOUT_LOAD);
|
||||
}, Constants.TIMEOUT_LOAD * saveCount);
|
||||
} else {
|
||||
saveCount = 0;
|
||||
if (isWindow()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue