Skip to content

Commit 677f807

Browse files
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

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "zap.cooking",
33
"license": "MIT",
4-
"version": "4.2.491",
4+
"version": "4.2.492",
55
"private": true,
66
"scripts": {
77
"dev": "vite dev",

0 commit comments

Comments
 (0)