fix grid animation when navigating from detail
This commit is contained in:
parent
b2d8754c7e
commit
7f706f12cd
@ -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%'})`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user