Refactor animation code in ZenGlanceManager for improved readability

This commit is contained in:
mr. M
2025-02-02 00:11:15 +01:00
parent d5cea8bb0e
commit da1a032c96

View File

@@ -149,20 +149,19 @@
window.requestAnimationFrame(() => { window.requestAnimationFrame(() => {
this.quickOpenGlance(); this.quickOpenGlance();
gZenUIManager.motion gZenUIManager.motion.animate(
.animate( this.#currentParentTab.linkedBrowser.closest('.browserSidebarContainer'),
this.#currentParentTab.linkedBrowser.closest('.browserSidebarContainer'), {
{ scale: 0.98,
scale: 0.98, backdropFilter: 'blur(5px)',
backdropFilter: 'blur(5px)', opacity: 0.6,
opacity: 0.6, },
}, {
{ duration: 0.4,
duration: 0.4, type: 'spring',
type: 'spring', bounce: 0.2,
bounce: 0.2, }
} );
);
this.overlay.removeAttribute('fade-out'); this.overlay.removeAttribute('fade-out');
this.browserWrapper.setAttribute('animate', true); this.browserWrapper.setAttribute('animate', true);
@@ -535,7 +534,7 @@
} }
getFocusedTab(aDir) { getFocusedTab(aDir) {
return aDir< 0 ? this.#currentParentTab : this.#currentTab; return aDir < 0 ? this.#currentParentTab : this.#currentTab;
} }
} }