Vanessa 2023-02-22 14:49:27 +08:00
parent fe6e9c68fc
commit 645d7a089f
4 changed files with 22 additions and 17 deletions

View file

@ -152,18 +152,11 @@ export class Dock {
public resetDockPosition(show: boolean) {
if (this.position === "Left") {
this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px;
opacity:${show ? 1 : 0};
top: 112px;bottom: 82px;left:0`);
this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px;opacity:${show ? 1 : 0};`);
} else if (this.position === "Right") {
this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px;
opacity:${show ? 1 : 0};
right:0;top: 112px;bottom: 82px;`);
this.layout.element.setAttribute("style", `width:${this.layout.element.clientWidth}px;opacity:${show ? 1 : 0};`);
} else {
this.layout.element.setAttribute("style", `height:${this.layout.element.clientHeight}px;
opacity:${show ? 1 : 0};
left:0;right:0;
${this.position === "Top" ? "top" : "bottom"}:0`);
this.layout.element.setAttribute("style", `height:${this.layout.element.clientHeight}px;opacity:${show ? 1 : 0};`);
}
}
@ -522,9 +515,9 @@ ${this.position === "Top" ? "top" : "bottom"}:0`);
this.element.querySelectorAll(".dock__item--active").forEach((item) => {
let size;
if (this.position === "Left" || this.position === "Right") {
size = parseInt(item.getAttribute("data-width")) || (["graph", "globalGraph", "backlink"].includes(item.getAttribute("data-type")) ? 320 : 220);
size = parseInt(item.getAttribute("data-width")) || (["graph", "globalGraph", "backlink"].includes(item.getAttribute("data-type")) ? 320 : 224);
} else {
size = parseInt(item.getAttribute("data-height")) || 220;
size = parseInt(item.getAttribute("data-height")) || 224;
}
if (size > max) {
max = size;

View file

@ -609,7 +609,7 @@ export const addResize = (obj: Layout | Wnd) => {
}
const getMinSize = (element: HTMLElement) => {
let minSize = 220;
let minSize = 224;
Array.from(element.querySelectorAll(".file-tree")).find((item) => {
if (item.classList.contains("sy__backlink") || item.classList.contains("sy__graph")
|| item.classList.contains("sy__globalGraph") || item.classList.contains("sy__inbox")) {