fix grid animation when navigating from detail

This commit is contained in:
Kiyomichi Kosaka 2025-06-20 08:00:10 +02:00
parent b2d8754c7e
commit 7f706f12cd

View File

@ -840,6 +840,11 @@ function animateSwipe(direction, onDone) {
const grid = document.getElementById('eonstripGrid'); const grid = document.getElementById('eonstripGrid');
if (!grid) { onDone(); return; } if (!grid) { onDone(); return; }
// Ensure a clean starting state when the grid was previously hidden
grid.style.transition = 'none';
grid.style.transform = 'translateX(0)';
void grid.offsetWidth; // force reflow
// slide out // slide out
grid.style.transition = 'transform 0.3s ease'; grid.style.transition = 'transform 0.3s ease';
grid.style.transform = `translateX(${direction > 0 ? '-100%' : '100%'})`; grid.style.transform = `translateX(${direction > 0 ? '-100%' : '100%'})`;