Commit 677f807
committed
fix(media): lightbox pages via native scroll-snap so swipe direction matches the gallery
The sliding-track lightbox translated a prev/current/next pane set by
hand and got swipe direction wrong on touch. Replace it with the same
mechanism the inline gallery uses: a native horizontal scroll-snap
pager with one full-screen pane per image. The browser handles touch
direction, momentum and snapping, so swiping in the lightbox feels
identical to the feed carousel by construction. Mouse drag-to-swipe
reuses the gallery's pointer rules; offscreen panes preload their
images; navigation clamps at the ends (matching the gallery) instead
of wrapping, and the chevrons hide at the edges accordingly.1 parent bef50b7 commit 677f807
2 files changed
Lines changed: 164 additions & 138 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
0 commit comments