From 6ba7eae21277608e9d3ac995806621b92d6ff5e5 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 28 Feb 2023 09:19:45 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7508 --- app/src/layout/dock/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts index c7ca2256c..b18624d49 100644 --- a/app/src/layout/dock/index.ts +++ b/app/src/layout/dock/index.ts @@ -218,12 +218,13 @@ export class Dock { if (!reset) { this.layout.element.style.opacity = "1"; } + this.layout.element.style.transform = ""; if (this.position === "Left") { - this.layout.element.style.transform = `translateX(${this.element.clientWidth}px)`; + this.layout.element.style.left = `${this.element.clientWidth}px`; } else if (this.position === "Right") { - this.layout.element.style.transform = `translateX(-${this.element.clientWidth}px)`; + this.layout.element.style.right = `${this.element.clientWidth}px`; } else if (this.position === "Bottom") { - this.layout.element.style.transform = `translateY(-${this.element.offsetHeight + document.getElementById("status").offsetHeight}px)`; + this.layout.element.style.bottom = `${this.element.offsetHeight + document.getElementById("status").offsetHeight}px`; } } @@ -235,10 +236,13 @@ export class Dock { } if (this.position === "Left") { this.layout.element.style.transform = `translateX(-${this.layout.element.clientWidth + 8}px)`; + this.layout.element.style.left = ""; } else if (this.position === "Right") { this.layout.element.style.transform = `translateX(${this.layout.element.clientWidth + 8}px)`; + this.layout.element.style.right = ""; } else if (this.position === "Bottom") { this.layout.element.style.transform = `translateY(${this.layout.element.clientHeight + 8}px)`; + this.layout.element.style.bottom = ""; } if (reset) { return;