mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-30 08:34:37 +00:00
Fix glance button animation for right side (#8934)
This commit is contained in:
@@ -122,17 +122,18 @@
|
||||
|
||||
showSidebarButtons(animate = false) {
|
||||
if (this.sidebarButtons.hasAttribute('hidden') && animate) {
|
||||
if (gZenVerticalTabsManager._prefsRightSide) {
|
||||
this.sidebarButtons.setAttribute('right', true);
|
||||
} else {
|
||||
this.sidebarButtons.setAttribute('right', false);
|
||||
}
|
||||
const isRightSide = gZenVerticalTabsManager._prefsRightSide;
|
||||
this.sidebarButtons.setAttribute('right', isRightSide);
|
||||
|
||||
for (const button of this.sidebarButtons.querySelectorAll('toolbarbutton')) {
|
||||
button.style.opacity = 0;
|
||||
}
|
||||
|
||||
const startX = isRightSide ? -50 : 50;
|
||||
|
||||
gZenUIManager.motion.animate(
|
||||
this.sidebarButtons.querySelectorAll('toolbarbutton'),
|
||||
{ x: [50, 0], opacity: [0, 1] },
|
||||
{ x: [startX, 0], opacity: [0, 1] },
|
||||
{ delay: gZenUIManager.motion.stagger(0.1) }
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user