This commit is contained in:
parent
0da79574d3
commit
483ae3b671
3 changed files with 10 additions and 13 deletions
|
@ -1,6 +1,7 @@
|
|||
import {Layout} from "./index";
|
||||
import {genUUID} from "../util/genID";
|
||||
import {
|
||||
fixWndFlex1,
|
||||
getInstanceById,
|
||||
getWndByLayout, JSONToCenter,
|
||||
newModelByInitData, pdfIsLoading, saveLayout,
|
||||
|
@ -716,7 +717,7 @@ export class Wnd {
|
|||
// 关闭分屏页签后光标消失
|
||||
const editors = getAllModels().editor;
|
||||
if (editors.length === 0) {
|
||||
clearOBG();
|
||||
clearOBG();
|
||||
} else {
|
||||
editors.forEach(item => {
|
||||
if (!item.element.classList.contains("fn__none")) {
|
||||
|
@ -965,13 +966,6 @@ export class Wnd {
|
|||
}
|
||||
previous.resize = undefined;
|
||||
previous.element.classList.add("fn__flex-1");
|
||||
} else if (!previous.element.classList.contains("fn__flex-1")) {
|
||||
// 分屏后要均分 https://github.com/siyuan-note/siyuan/issues/5657
|
||||
if (layout.direction === "lr") {
|
||||
previous.element.style.width = (previous.element.clientWidth + element.clientWidth) + "px";
|
||||
} else {
|
||||
previous.element.style.height = (previous.element.clientHeight + element.clientHeight) + "px";
|
||||
}
|
||||
}
|
||||
// https://github.com/siyuan-note/siyuan/issues/5844
|
||||
if (layout.children.length > 2 && index === 0) {
|
||||
|
@ -988,6 +982,7 @@ export class Wnd {
|
|||
element.nextElementSibling.remove();
|
||||
}
|
||||
element.remove();
|
||||
fixWndFlex1(layout);
|
||||
resizeTabs();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import {getAllModels} from "../getAll";
|
|||
import {Tab} from "../Tab";
|
||||
import {Graph} from "./Graph";
|
||||
import {Outline} from "./Outline";
|
||||
import {getInstanceById, getWndByLayout, saveLayout, switchWnd} from "../util";
|
||||
import {fixWndFlex1, getInstanceById, getWndByLayout, saveLayout, switchWnd} from "../util";
|
||||
import {resizeTabs} from "../tabUtil";
|
||||
import {Backlink} from "./Backlink";
|
||||
import {App} from "../../index";
|
||||
|
@ -159,10 +159,10 @@ export const openOutline = async (protyle: IProtyle) => {
|
|||
}));
|
||||
}
|
||||
}), false, false);
|
||||
newWnd.element.style.width = "200px";
|
||||
newWnd.element.classList.remove("fn__flex-1")
|
||||
switchWnd(newWnd, wnd);
|
||||
// https://github.com/siyuan-note/siyuan/issues/10500
|
||||
wnd.element.classList.remove("fn__flex-1");
|
||||
wnd.element.style.width = wnd.element.parentElement.clientWidth - 200 + "px";
|
||||
fixWndFlex1(newWnd.parent);
|
||||
saveLayout();
|
||||
};
|
||||
|
||||
|
|
|
@ -93,7 +93,9 @@ export class Layout {
|
|||
}
|
||||
});
|
||||
}
|
||||
fixWndFlex1(this);
|
||||
if (id) {
|
||||
fixWndFlex1(this);
|
||||
}
|
||||
addResize(child);
|
||||
resizeTabs(false);
|
||||
child.parent = this;
|
||||
|
|
Loading…
Add table
Reference in a new issue