Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Group mind map fit action with zoom controls https://github.com/siyuan-note/siyuan/issues/20723

Daniel8175d2c21520
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy
index ec11bb4723..4f38fbb9c1 100644
--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy
+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy
@@ -8,7 +8,7 @@
"title": "Formatting elements",
"title-img": "background-color:#269;background-image: linear-gradient(white 2px, transparent 2px),linear-gradient(90deg, white 2px, transparent 2px),linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;",
"type": "doc",
- "updated": "20261020162345"
+ "updated": "20261020165811"
},
"Children": [
{
@@ -1961,7 +1961,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20210104091509-v1x69oc",
- "updated": "20261020162345"
+ "updated": "20261020165811"
},
"Children": [
{
@@ -2041,6 +2041,38 @@
}
]
},
+ {
+ "ID": "20261020165811-dthghbx",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261020165811-dthghbx",
+ "updated": "20261020165811"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "Hover over or tap the zoom percentage in the toolbar to open the zoom panel. Use the slider to adjust zoom. Click "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "Reset"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " to restore 100%, or "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "Fit to canvas"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " to adjust the zoom and center the whole map."
+ }
+ ]
+ },
{
"ID": "20261018163000-cvdncjc",
"Type": "NodeParagraph",
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy
index 106d02aad2..aec1cc8fc3 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy
@@ -8,7 +8,7 @@
"title": "排版元素",
"title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);",
"type": "doc",
- "updated": "20261020162345"
+ "updated": "20261020165811"
},
"Children": [
{
@@ -1964,7 +1964,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20210104091228-wdpx6ev",
- "updated": "20261020162345"
+ "updated": "20261020165811"
},
"Children": [
{
@@ -2044,6 +2044,38 @@
}
]
},
+ {
+ "ID": "20261020165811-3jtw0sw",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261020165811-3jtw0sw",
+ "updated": "20261020165811"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "将指针悬停在工具栏的缩放百分比上,或点击该百分比,可展开缩放面板。滑块用于调整比例;点击 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "重置"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " 恢复为 100%,点击 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "适应画布"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " 自动调整缩放并居中显示整张导图。"
+ }
+ ]
+ },
{
"ID": "20261018163000-rtw5v99",
"Type": "NodeParagraph",
diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy
index 7ead9ea871..6c0f7d8f29 100644
--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy
+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy
@@ -8,7 +8,7 @@
"title": "排版元素",
"title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);",
"type": "doc",
- "updated": "20261020162345"
+ "updated": "20261020165811"
},
"Children": [
{
@@ -1962,7 +1962,7 @@
"HeadingLevel": 2,
"Properties": {
"id": "20211226122008-731sqd6",
- "updated": "20261020162345"
+ "updated": "20261020165811"
},
"Children": [
{
@@ -2042,6 +2042,38 @@
}
]
},
+ {
+ "ID": "20261020165811-mubt7ro",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261020165811-mubt7ro",
+ "updated": "20261020165811"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "將指標停留在工具列的縮放百分比上,或點擊該百分比,即可展開縮放面板。滑桿用於調整比例;點擊 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "重置"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " 恢復為 100%,點擊 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "符合畫布大小"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " 自動調整縮放並置中顯示整張心智圖。"
+ }
+ ]
+ },
{
"ID": "20261018163000-byam24i",
"Type": "NodeParagraph",
diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy
index f9457cf699..2e70c47dfd 100644
--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy
+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy
@@ -9,7 +9,7 @@
"title": "書式要素",
"title-img": "background-color:#269;background-image: linear-gradient(white 2px, transparent 2px),linear-gradient(90deg, white 2px, transparent 2px),linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;",
"type": "doc",
- "updated": "20261020162345"
+ "updated": "20261020165811"
},
"Children": [
{
@@ -2090,7 +2090,7 @@
"Properties": {
"ID": "20240530101000-ch5e4vh",
"id": "20240530101000-1ev7xub",
- "updated": "20261020162345"
+ "updated": "20261020165811"
},
"Children": [
{
@@ -2170,6 +2170,38 @@
}
]
},
+ {
+ "ID": "20261020165811-336bt9a",
+ "Type": "NodeParagraph",
+ "Properties": {
+ "id": "20261020165811-336bt9a",
+ "updated": "20261020165811"
+ },
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "ツールバーの倍率表示にポインターを重ねるかタップすると、ズームパネルが開きます。スライダーで倍率を調整できます。"
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "リセット"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " を押すと 100% に戻り、"
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "キャンバスに合わせる"
+ },
+ {
+ "Type": "NodeText",
+ "Data": " を押すとマップ全体が収まるように倍率を調整して中央に表示します。"
+ }
+ ]
+ },
{
"ID": "20261018163000-qe8wgtd",
"Type": "NodeParagraph",
diff --git a/app/src/protyle/render/listMindmap/model.test.ts b/app/src/protyle/render/listMindmap/model.test.ts
index 1ace0e6356..3d0a668f15 100644
--- a/app/src/protyle/render/listMindmap/model.test.ts
+++ b/app/src/protyle/render/listMindmap/model.test.ts
@@ -1313,6 +1313,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
// 顶部控件按悬停、焦点和全屏的实际可见状态避让,缩放画布保持相同的局部间距。
const navigationToolbar = navigationHost.querySelector<HTMLElement>(".mindmap-view__toolbar");
const navigationFit = () => navigationToolbar.querySelector<HTMLButtonElement>('[aria-label="listMindmapFit"]');
+ const navigationControl = () => navigationToolbar.querySelector<HTMLButtonElement>('[aria-label="cursorHand"]');
const moveNavigationPointer = async (inside: boolean) => {
navigationHost.scrollIntoView({block: "start"});
const bounds = navigationHost.getBoundingClientRect();
@@ -1323,7 +1324,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
await settle();
};
const placeAtToolbar = (left?: number) => {
- const controlBounds = navigationFit().getBoundingClientRect();
+ const controlBounds = navigationControl().getBoundingClientRect();
const viewportBounds = navigationViewport.getBoundingClientRect();
const rect = addedNode.getBoundingClientRect();
const scaleX = viewportBounds.width / navigationViewport.offsetWidth;
@@ -1344,12 +1345,12 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
navigationHost.focus();
await moveNavigationPointer(mode === "hover");
if (mode === "focus") {
- navigationFit().focus();
+ navigationControl().focus();
}
check.equal(getComputedStyle(navigationToolbar).opacity, "1", `${mode} shows the toolbar`);
placeAtToolbar();
const before = addedNode.getBoundingClientRect();
- check.ok(before.top < navigationFit().getBoundingClientRect().bottom, "target starts behind a toolbar control");
+ check.ok(before.top < navigationControl().getBoundingClientRect().bottom, "target starts behind a toolbar control");
navigationView.refreshLayout();
if (mode === "focus") {
navigationView.revealNode(addedItem.dataset.nodeId);
@@ -1360,7 +1361,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
}));
}
await settle();
- check.ok(addedNode.getBoundingClientRect().top >= navigationFit().getBoundingClientRect().bottom + 15 * scale,
+ check.ok(addedNode.getBoundingClientRect().top >= navigationControl().getBoundingClientRect().bottom + 15 * scale,
`node stays below visible toolbar controls, mode=${mode}, width=${width}`);
}
}
@@ -1409,10 +1410,39 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
Array.from({length: 20}, (_value, index) => ` * Branch ${index}\n`).join(""));
navigationView.update(api.readListMindmap(fittingSource.firstElementChild as HTMLElement));
navigationHost.style.height = "420px";
- const activateNavigationFit = async (keyboard: boolean) => {
+ const activateNavigationFit = async (keyboard: boolean, touch = false) => {
navigationHost.scrollIntoView({block: "start"});
+ const zoom = navigationToolbar.querySelector<HTMLElement>(".mindmap-view__zoom");
+ const zoomBounds = zoom.getBoundingClientRect();
+ const zoomPoint = {x: Math.round(zoomBounds.left + zoomBounds.width / 2),
+ y: Math.round(zoomBounds.top + zoomBounds.height / 2)};
+ if (touch) {
+ await require("electron").ipcRenderer.invoke("mindmap-view-native-touch", [
+ {type: "touchStart", touchPoints: [{...zoomPoint, id: 0}]},
+ {type: "touchEnd", touchPoints: []},
+ ]);
+ } else if (keyboard) {
+ zoom.focus();
+ } else {
+ await require("electron").ipcRenderer.invoke("mindmap-view-native-input", [
+ {type: "mouseMove", ...zoomPoint},
+ ]);
+ }
+ await settle();
+ check.equal(getComputedStyle(navigationToolbar.querySelector(".mindmap-view__zoom-actions")).display, "flex",
+ "hovering, focusing or tapping the percentage opens the zoom panel");
const bounds = navigationFit().getBoundingClientRect();
const point = {x: Math.round(bounds.left + bounds.width / 2), y: Math.round(bounds.top + bounds.height / 2)};
+ check.equal(document.elementFromPoint(point.x, point.y)?.closest("button"), navigationFit(),
+ "fit in the zoom panel is visible and reachable");
+ if (touch) {
+ await require("electron").ipcRenderer.invoke("mindmap-view-native-touch", [
+ {type: "touchStart", touchPoints: [{...point, id: 0}]},
+ {type: "touchEnd", touchPoints: []},
+ ]);
+ await settle();
+ return;
+ }
if (keyboard) {
navigationFit().focus();
}
@@ -1425,7 +1455,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
]);
await settle();
};
- for (const mode of ["hover", "focus", "fullscreen"]) {
+ for (const mode of ["hover", "focus", "fullscreen", "touch"]) {
for (const width of [760, 400, 300]) {
const outerScale = width === 300 ? .5 : 1;
navigationView.setReadOnly(width !== 400);
@@ -1440,7 +1470,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
navigationView.offsetX = 100;
navigationView.offsetY = -100;
navigationView.draw();
- await activateNavigationFit(mode === "focus");
+ await activateNavigationFit(mode === "focus", mode === "touch");
check.equal(getComputedStyle(navigationToolbar).opacity, "1");
check.ok(navigationView.scale < 1 && navigationView.scale > .15,
`the tall map needs an unconstrained fit, mode=${mode}, width=${width}, scale=${navigationView.scale}`);
@@ -1454,9 +1484,11 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
`fit leaves the whole map below the toolbar, mode=${mode}, width=${width}`);
check.ok(contentBottom <= viewportBounds.bottom - 65 * outerScale, "fit preserves the bottom panel clearance");
const fittedTransform = [navigationView.scale, navigationView.offsetX, navigationView.offsetY];
- await activateNavigationFit(mode === "focus");
+ await activateNavigationFit(mode === "focus", mode === "touch");
check.deepEqual([navigationView.scale, navigationView.offsetX, navigationView.offsetY], fittedTransform,
"repeated fit activation preserves scale and centering");
+ navigationToolbar.querySelector<HTMLButtonElement>('[aria-label="reset"]').click();
+ check.equal(navigationView.scale, 1, "reset restores 100% independently of fit to canvas");
}
}
navigationHost.classList.remove("fullscreen");
@@ -1988,7 +2020,10 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
const toolbarZoom = toolbar.querySelector<HTMLElement>(".mindmap-view__zoom");
const toolbarPopup = toolbar.querySelector<HTMLElement>(".mindmap-view__zoom-actions");
const toolbarGroup = toolbar.querySelector<HTMLElement>(".mindmap-view__toolbar-group");
- for (const width of [96, 180, 260, 360, 700]) {
+ check.equal(fitButton.parentElement, toolbarPopup, "fit shares the zoom panel with the slider and reset");
+ check.equal(toolbarGroup.querySelector(':scope > [aria-label="listMindmapFit"]'), null,
+ "fit no longer occupies a separate top-level toolbar slot");
+ for (const width of [96, 180, 240, 260, 320, 360, 700]) {
for (const fontSize of [14, 32]) {
host.style.width = `${width}px`;
host.style.fontSize = `${fontSize}px`;
@@ -2005,8 +2040,20 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
}
const firstButton = toolbar.querySelector("button").getBoundingClientRect();
const lastButton = toolbarGroup.lastElementChild.getBoundingClientRect();
- check.equal(lastButton.top > firstButton.top, width < 260, "compact global toolbars wrap only when necessary");
+ check.equal(lastButton.top > firstButton.top, width < 240,
+ `compact global toolbars wrap only when necessary, width=${width}, fontSize=${fontSize}`);
check.equal(getComputedStyle(toolbarPopup).display, "flex", "zoom popup remains visible");
+ if (width >= 240) {
+ const popupBounds = toolbarPopup.getBoundingClientRect();
+ check.ok(popupBounds.left >= bounds.left && popupBounds.right <= bounds.right,
+ `zoom panel stays inside the map, width=${width}, fontSize=${fontSize}`);
+ for (const control of toolbarPopup.querySelectorAll<HTMLElement>("button")) {
+ const rect = control.getBoundingClientRect();
+ check.equal(document.elementFromPoint(rect.left + rect.width / 2,
+ rect.top + rect.height / 2)?.closest("button"), control,
+ "reset and fit remain reachable in the zoom panel");
+ }
+ }
if (width === 180) {
const popupBounds = toolbarPopup.getBoundingClientRect();
check.ok(popupBounds.bottom > toolbar.getBoundingClientRect().bottom,
@@ -2024,9 +2071,11 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,
host.style.cssText = originalHostStyle;
host.focus();
view.zoomAt(1);
+ toolbarZoom.focus();
fitButton.dispatchEvent(new PointerEvent("pointerover", {bubbles: true}));
check.equal(host.querySelector<HTMLElement>('[role="tooltip"]').hidden, false);
check.equal(host.querySelector('[role="tooltip"]').textContent, "listMindmapFit");
+ host.focus();
select(beta);
check.equal(inspector.hidden, false);
check.equal(inspector.classList.contains("mindmap-view__inspector--node"), true);
@@ -4959,6 +5008,10 @@ app.whenReady().then(async () => {
deltaX: -event.deltaX, deltaY: -event.deltaY,
});
} else {
+ // 拖拽移动明确携带按下的按钮状态,避免切换触摸模拟后丢失原生指针捕获。
+ if (event.type === "mouseMove" && event.button) {
+ event.modifiers = [...(event.modifiers || []), event.button + "buttondown"];
+ }
win.webContents.sendInputEvent(event);
}
await new Promise(resolve => setTimeout(resolve, 20));
diff --git a/app/src/protyle/render/listMindmap/view.ts b/app/src/protyle/render/listMindmap/view.ts
index b93bf0279a..f036a9118b 100644
--- a/app/src/protyle/render/listMindmap/view.ts
+++ b/app/src/protyle/render/listMindmap/view.ts
@@ -678,10 +678,11 @@ export class ListMindmapView {
this.zoomSlider.setAttribute("aria-label", this.label("zoom"));
this.zoomSlider.oninput = () => this.zoomAt(Number(this.zoomSlider.value) / 100);
const reset = this.makeButton("reset", "iconRefresh", () => this.zoomAt(1));
- zoomActions.append(this.zoomSlider, reset);
+ const fit = this.makeButton("listMindmapFit", "iconFocus", () => this.fit());
+ this.buttons.set("fit", fit);
+ zoomActions.append(this.zoomSlider, reset, fit);
zoomControl.append(this.zoomLabel, zoomActions);
controls.append(zoomControl);
- add("fit", "listMindmapFit", "iconFocus", () => this.fit());
add("documentLayout", "listMindmapDocumentLayout", "iconLayout", () => {
this.documentFrame.hidden = !this.documentFrame.hidden;
const button = this.buttons.get("documentLayout");