mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
bb8b307c2e
commit
929a516e1e
2 changed files with 5 additions and 9 deletions
|
|
@ -9,7 +9,7 @@ import {Bookmark} from "./Bookmark";
|
|||
import {Tag} from "./Tag";
|
||||
import {Graph} from "./Graph";
|
||||
import {Model} from "../Model";
|
||||
import {saveLayout, setPanelFocus} from "../util";
|
||||
import {adjustLayout, saveLayout, setPanelFocus} from "../util";
|
||||
import {getDockByType, resizeTabs} from "../tabUtil";
|
||||
import {Inbox} from "./Inbox";
|
||||
import {Protyle} from "../../protyle";
|
||||
|
|
@ -707,7 +707,8 @@ export class Dock {
|
|||
this.layout.element.style.opacity = "";
|
||||
this.hideResizeTimeout = window.setTimeout(() => {
|
||||
this.resizeElement.classList.remove("fn__none");
|
||||
}, 200); // 需等待动画完毕后再出现,否则会出现滚动条 https://ld246.com/article/1676596622064
|
||||
adjustLayout();
|
||||
}, Constants.TIMEOUT_TRANSITION); // 需等待动画完毕后再出现,否则会出现滚动条 https://ld246.com/article/1676596622064
|
||||
}
|
||||
if (document.activeElement) {
|
||||
(document.activeElement as HTMLElement).blur();
|
||||
|
|
|
|||
|
|
@ -986,15 +986,13 @@ export const adjustLayout = (layout: Layout = window.siyuan.layout.centerLayout.
|
|||
item.element.style.minWidth = "";
|
||||
}
|
||||
});
|
||||
let lastItem: HTMLElement;
|
||||
let index = Math.ceil(screen.width / 8);
|
||||
if (layout.direction === "lr") {
|
||||
if (layout.direction === "lr" && layout.element.scrollWidth > layout.element.clientWidth + 2 ) {
|
||||
let index = Math.ceil(screen.width / 8);
|
||||
while (index > 0) {
|
||||
let width = 0;
|
||||
layout.children.find((item: Layout | Wnd) => {
|
||||
if (item.element.style.width && item.element.style.width !== "0px") {
|
||||
item.element.style.maxWidth = Math.max(Math.min(item.element.clientWidth, window.innerWidth) - 8, 64) + "px";
|
||||
lastItem = item.element;
|
||||
}
|
||||
width += item.element.clientWidth;
|
||||
});
|
||||
|
|
@ -1004,9 +1002,6 @@ export const adjustLayout = (layout: Layout = window.siyuan.layout.centerLayout.
|
|||
}
|
||||
}
|
||||
}
|
||||
if (lastItem) {
|
||||
lastItem.style.maxWidth = Math.max(Math.min(lastItem.clientWidth, window.innerWidth) - 8, 64) + "px";
|
||||
}
|
||||
layout.children.forEach((item: Layout | Wnd) => {
|
||||
if (item instanceof Layout && item.size !== "0px") {
|
||||
adjustLayout(item);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue