Refactor Highlight Clearing Logic in AreaTabs Component

- Updated comments for clarity on highlight clearing timing after animations.
- Reinforced the logic to ensure highlights are cleared after all animations complete, improving visual consistency.
This commit is contained in:
Bastian Masanek
2025-11-05 02:58:44 +01:00
parent c6e7fcb43a
commit 1349f42f41

View File

@@ -155,13 +155,12 @@ watch(visibleAreas, (newAreas, oldAreas) => {
}, 300 + (index * 150)) // Stagger: 300ms, 450ms, 600ms, ...
})
// Clear all highlights after animation completes (including fade-out)
// Animation timeline: glow+pulse 2x (~1.4s) + fade-out (0.6s) = 2.0s
// Wait 2.1s to ensure fade-out completes before removing class
// TEMPORARILY DISABLED FOR TESTING
// setTimeout(() => {
// newlyAddedAreaIds.value = []
// }, 2100)
// Clear all highlights after animation completes
// Animation timeline: glow 2x + pulse 2x + opacity fade = 2.0s
// Wait 2.1s to ensure all animations complete before removing class
setTimeout(() => {
newlyAddedAreaIds.value = []
}, 2100)
}
previousAreaIds.value = newAreaIds