Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/17384

Vanessa483d3be7fe45
diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts
index 6920938a07..1e42ebd4cb 100644
--- a/app/src/layout/dock/index.ts
+++ b/app/src/layout/dock/index.ts
@@ -459,19 +459,13 @@ export class Dock {
!this.elements[1].querySelector(".dock__item--active")) {
if (this.position === "Left") {
this.layout.element.style.width = "0px";
- setTimeout(() => {
- this.layout.element.style.marginRight = "0px";
- }, Constants.TIMEOUT_TRANSITION);
+ this.layout.element.style.marginRight = "0px";
} else if (this.position === "Right") {
this.layout.element.style.width = "0px";
- setTimeout(() => {
- this.layout.element.style.marginLeft = "0px";
- }, Constants.TIMEOUT_TRANSITION);
+ this.layout.element.style.marginLeft = "0px";
} else {
this.layout.element.style.height = "0px";
- setTimeout(() => {
- this.layout.element.style.marginTop = "0px";
- }, Constants.TIMEOUT_TRANSITION);
+ this.layout.element.style.marginTop = "0px";
}
this.resizeElement.classList.add("fn__none");
clearTimeout(this.hideResizeTimeout);
@@ -752,7 +746,7 @@ export class Dock {
// 目标处理
sourceElement.setAttribute("data-index", index.toString());
if (previousType) {
- this.elements[0].parentElement.querySelector(`[data-type="${previousType}"]`).after(sourceElement);
+ this.elements[index].parentElement.querySelector(`[data-type="${previousType}"]`).after(sourceElement);
} else {
this.elements[index].insertAdjacentElement("afterbegin", sourceElement);
}