diff --git a/app/src/assets/scss/_layout.scss b/app/src/assets/scss/_layout.scss index 994961231..207b804de 100644 --- a/app/src/assets/scss/_layout.scss +++ b/app/src/assets/scss/_layout.scss @@ -11,11 +11,18 @@ } } + &--floatl, + &--floatr, + &--floatt, + &--floatb { + transition: var(--b3-width-transition); + } + &--float { position: fixed; z-index: 3; min-height: auto; - transition: transform .2s cubic-bezier(0, 0, .2, 1) 0ms, opacity .2s cubic-bezier(0, 0, .2, 1) 0ms; + transition: transform .2s cubic-bezier(0, 0, .2, 1) 0ms, opacity .3s cubic-bezier(0, 0, .2, 1) 0ms; &.layout--floatl { border-radius: 0 8px 8px 0; diff --git a/app/src/layout/dock/index.ts b/app/src/layout/dock/index.ts index d27765c5c..9488a656a 100644 --- a/app/src/layout/dock/index.ts +++ b/app/src/layout/dock/index.ts @@ -104,7 +104,6 @@ export class Dock { target.setAttribute("aria-label", window.siyuan.languages.unpin); this.layout.element.style.opacity = ""; this.layout.element.style.transform = ""; - this.layout.element.style.transition = "var(--b3-width-transition)"; if (hasActive) { this.resizeElement.classList.remove("fn__none"); } diff --git a/app/src/layout/util.ts b/app/src/layout/util.ts index fc2548c29..e496aafd0 100644 --- a/app/src/layout/util.ts +++ b/app/src/layout/util.ts @@ -693,9 +693,7 @@ export const addResize = (obj: Layout | Wnd) => { if (range) { focusByRange(range); } - nextElement.style.transition = "var(--b3-width-transition)"; nextElement.style.overflow = ""; - previousElement.style.transition = "var(--b3-width-transition)"; previousElement.style.overflow = ""; }; }); @@ -707,8 +705,6 @@ export const addResize = (obj: Layout | Wnd) => { } resizeElement.classList.add("layout__resize"); obj.element.insertAdjacentElement("beforebegin", resizeElement); - obj.element.style.transition = "var(--b3-width-transition)"; - (resizeElement.previousElementSibling as HTMLElement).style.transition = "var(--b3-width-transition)"; resizeWnd(resizeElement, obj.resize); } };