Enhance tab animation logic to include vertical tabs peripherals in workspace indicator animations

This commit is contained in:
mr. M
2025-01-18 11:06:01 +01:00
parent ccfe709789
commit ef2a2a5efc

View File

@@ -1350,14 +1350,15 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
let count = 0;
const onAnimationEnd = () => {
count++;
// +1 for the workspace indicator tab
if (count >= tabs.length + 1) {
// +1 for the workspace indicator tab and vertical tabs periferals
if (count >= tabs.length + 2) {
resolve();
}
};
this.tabContainer.removeAttribute('dont-animate-tabs');
// Also animate the workspace indicator label
this._animateElement(document.getElementById('zen-current-workspace-indicator'), direction, out, () => onAnimationEnd());
this._animateElement(document.getElementById('tabbrowser-arrowscrollbox-periphery'), direction, out, () => onAnimationEnd());
for (const tab of tabs) {
this._animateElement(tab, direction, out, () => onAnimationEnd());
}