Skip to content

Commit 24f4365

Browse files
committed
🎨 fix #9640
1 parent 70bf7c1 commit 24f4365

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/src/layout/dock/index.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ export class Dock {
4444
this.layout = window.siyuan.layout.layout.children[0].children[0] as Layout;
4545
this.resizeElement = this.layout.element.nextElementSibling as HTMLElement;
4646
this.layout.element.classList.add("layout__dockl");
47-
this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize layout__dockresize--lr\"></div>");
47+
this.layout.element.insertAdjacentHTML("beforeend", '<div class="layout__dockresize layout__dockresize--lr"></div>');
4848
break;
4949
case "Right":
5050
this.layout = window.siyuan.layout.layout.children[0].children[2] as Layout;
5151
this.resizeElement = this.layout.element.previousElementSibling as HTMLElement;
5252
this.layout.element.classList.add("layout__dockr");
53-
this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize layout__dockresize--lr\"></div>");
53+
this.layout.element.insertAdjacentHTML("beforeend", '<div class="layout__dockresize layout__dockresize--lr"></div>');
5454
break;
5555
case "Bottom":
5656
this.layout = window.siyuan.layout.layout.children[1] as Layout;
5757
this.resizeElement = this.layout.element.previousElementSibling as HTMLElement;
5858
this.layout.element.classList.add("layout__dockb");
59-
this.layout.element.insertAdjacentHTML("beforeend", "<div class=\"layout__dockresize\"></div>");
59+
this.layout.element.insertAdjacentHTML("beforeend", '<div class="layout__dockresize"></div>');
6060
break;
6161
}
6262
this.app = options.app;
@@ -189,6 +189,12 @@ export class Dock {
189189
documentSelf.onselectstart = null;
190190
documentSelf.onselect = null;
191191
this.setSize();
192+
this.element.querySelectorAll(".dock__item--active").forEach(item => {
193+
const customModel = this.data[item.getAttribute("data-type")]
194+
if (customModel && customModel instanceof Custom && customModel.resize) {
195+
customModel.resize();
196+
}
197+
});
192198
};
193199
});
194200

0 commit comments

Comments
 (0)