mirror of
https://github.com/zen-browser/desktop.git
synced 2026-04-25 16:54:21 +00:00
Refactor animation code for improved readability and maintainability
This commit is contained in:
@@ -217,24 +217,26 @@ var gZenVerticalTabsManager = {
|
||||
return;
|
||||
}
|
||||
const isLastTab = aTab.nextElementSibling === null;
|
||||
gZenUIManager.motion.animate(
|
||||
aTab,
|
||||
{
|
||||
opacity: [0, 1],
|
||||
transform: ['translateY(-20px)', 'translateY(0px)'],
|
||||
marginBottom: isLastTab ? [] : ['-20px', '0px'],
|
||||
},
|
||||
{
|
||||
duration: 0.2,
|
||||
type: 'spring',
|
||||
bounce: 0,
|
||||
}
|
||||
).then(() => {
|
||||
aTab.style.removeProperty('margin-bottom');
|
||||
aTab.style.removeProperty('transform');
|
||||
aTab.style.removeProperty('opacity');
|
||||
aTab.style.removeProperty('filter');
|
||||
});
|
||||
gZenUIManager.motion
|
||||
.animate(
|
||||
aTab,
|
||||
{
|
||||
opacity: [0, 1],
|
||||
transform: ['translateY(-20px)', 'translateY(0px)'],
|
||||
marginBottom: isLastTab ? [] : ['-20px', '0px'],
|
||||
},
|
||||
{
|
||||
duration: 0.2,
|
||||
type: 'spring',
|
||||
bounce: 0,
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
aTab.style.removeProperty('margin-bottom');
|
||||
aTab.style.removeProperty('transform');
|
||||
aTab.style.removeProperty('opacity');
|
||||
aTab.style.removeProperty('filter');
|
||||
});
|
||||
},
|
||||
|
||||
get actualWindowButtons() {
|
||||
|
||||
Reference in New Issue
Block a user