Vanessa
2026-04-23 11:01:31 +08:00
parent c6b65a85cc
commit ddaf16dd9b
2 changed files with 12 additions and 15 deletions
-13
View File
@@ -39,19 +39,6 @@
content: none;
}
&__dockl {
margin-right: 4px;
}
&__dockr {
margin-left: 4px;
}
&__dockb {
margin-top: 4px;
}
& > .layout__dockresize {
display: none;
}
+12 -2
View File
@@ -538,10 +538,15 @@ export class Dock {
target.classList.remove("dock__item--active", "dock__item--activefocus");
// dock 隐藏
if (this.element.querySelectorAll(".dock__item--active").length === 0) {
if (this.position === "Left" || this.position === "Right") {
if (this.position === "Left") {
this.layout.element.style.width = "0px";
this.layout.element.style.marginRight = "0px";
} else if (this.position === "Right") {
this.layout.element.style.width = "0px";
this.layout.element.style.marginLeft = "0px";
} else {
this.layout.element.style.height = "0px";
this.layout.element.style.marginTop = "0px";
}
this.resizeElement.classList.add("fn__none");
clearTimeout(this.hideResizeTimeout);
@@ -695,10 +700,15 @@ export class Dock {
});
}
// dock 显示
if (this.position === "Left" || this.position === "Right") {
if (this.position === "Left") {
this.layout.element.style.width = this.getMaxSize() + "px";
this.layout.element.style.marginRight = "4px";
} else if (this.position === "Right") {
this.layout.element.style.width = this.getMaxSize() + "px";
this.layout.element.style.marginLeft = "4px";
} else {
this.layout.element.style.height = this.getMaxSize() + "px";
this.layout.element.style.marginTop = "4px";
}
if ((type === "graph" || type === "globalGraph") && this.layout.element.querySelector(".fullscreen")) {
document.getElementById("drag")?.classList.add("fn__hidden");