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

View File

@ -30,6 +30,9 @@
border-left: 0;
overflow: hidden;
box-shadow: 8px 0 24px rgb(140 149 159 / 20%);
top: 112px;
bottom: 82px;
left: 0;
}
&.layout--floatr {
@ -38,16 +41,25 @@
border-right: 0;
border-radius: 8px 0 0 8px;
overflow: hidden;
top: 112px;
bottom: 82px;
right: 0;
}
&.layout--floatt {
border-bottom: 1px solid var(--b3-border-color);
box-shadow: var(--b3-dialog-shadow);
left: 0;
top: 0;
right: 0;
}
&.layout--floatb {
border-top: 1px solid var(--b3-border-color);
box-shadow: 0 -8px 24px rgb(140 149 159 / 20%);
left: 0;
right: 0;
bottom: 0;
}
}

View File

@ -331,13 +331,13 @@ export abstract class Constants {
data: [
[{
type: "file",
size: {width: 220, height: 0},
size: {width: 224, height: 0},
show: true,
icon: "iconFiles",
hotkeyLangId: "fileTree",
}, {
type: "outline",
size: {width: 220, height: 0},
size: {width: 224, height: 0},
show: false,
icon: "iconAlignCenter",
hotkeyLangId: "outline",
@ -349,13 +349,13 @@ export abstract class Constants {
hotkeyLangId: "inbox",
}], [{
type: "bookmark",
size: {width: 220, height: 0},
size: {width: 224, height: 0},
show: false,
icon: "iconBookmark",
hotkeyLangId: "bookmark",
}, {
type: "tag",
size: {width: 220, height: 0},
size: {width: 224, height: 0},
show: false,
icon: "iconTags",
hotkeyLangId: "tag",

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")) {