Skip to content

Commit ff8aa4a

Browse files
Copilotlstein
andcommitted
Enable slide animation for backward paging by using 300ms duration in slideTo
Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
1 parent a4e7fc7 commit ff8aa4a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

photomap/frontend/static/javascript/grid-view.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,12 @@ class GridViewManager {
430430
// Use a microtask (Promise) to ensure prepend DOM changes are committed
431431
Promise.resolve().then(() => {
432432
if (this.swiper && !this.swiper.destroyed) {
433-
this.swiper.slideTo(this.currentColumns, 0, false);
434-
this.suppressSlideChange = false;
433+
// Use default speed (300ms) for smooth animation, but suppress slide change event
434+
this.swiper.slideTo(this.currentColumns, 300, false);
435+
// Reset suppressSlideChange after transition completes
436+
setTimeout(() => {
437+
this.suppressSlideChange = false;
438+
}, 350); // Slightly longer than animation duration
435439
}
436440
});
437441
}

0 commit comments

Comments
 (0)