gh-15438: Fix library compact mode animation (gh-15502)

This commit is contained in:
fen4flo
2026-09-21 16:52:29 +02:00
committed by GitHub
parent 7545e5a870
commit e68b5e5c26

View File

@@ -149,13 +149,13 @@ export class ZenLibrary extends MozLitElement {
? compactModeOffsetDirection
: 0;
const leftAligned = this.#libraryOnRight ? -1 : 1;
let webOffset =
(this.#libraryOnRight ? -1 : 1) * (libraryWidth - this.#toolboxWidth) +
compactModeOffset;
leftAligned * (libraryWidth - this.#toolboxWidth) + compactModeOffset;
this.style.setProperty(
"transform",
`translateX(calc(-100% * (1 - ${value})))`
`translateX(calc(${leftAligned} * -100% * (1 - ${value})))`
);
lazy.appContentWrapper?.style.setProperty(
"transform",
@@ -473,8 +473,8 @@ export class ZenLibrary extends MozLitElement {
if (!this.instance && createIfMissing) {
this.instance = new ZenLibrary();
this.instance.style.visibility = "collapse";
const mountRoot = document.getElementById("zen-main-app-wrapper");
mountRoot.append(this.instance);
const mountAfter = document.getElementById("navigator-toolbox");
mountAfter.after(this.instance);
}
return this.instance;
}