Parent Issue
Part of #74 — More controls for media in lightbox
Problem
On mobile, users expect to pinch-to-zoom on images just like in native photo viewers. The zoom infrastructure from the fit mode & zoom sub-issue provides the scale/pan state, but touch gesture recognition needs dedicated handling.
Proposed Design
- Two-finger pinch gesture on images enters zoom mode (if in fit mode) and adjusts zoom level
- Uses the same
lightboxZoomMin / lightboxZoomMax bounds from settings
- Zoom anchors to the midpoint between the two fingers
- Pinch gestures are distinguished from single-finger swipe (navigation) by tracking touch count
- When zoomed in via pinch, single-finger drag pans the image (swipe-to-navigate disabled)
- When zoom returns to or below fit level, fit mode re-engages and swipe-to-navigate resumes
Acceptance Criteria
Edge Cases
- Rapid alternation between one-finger and two-finger touches — debounce gesture detection to avoid flickering between pan and navigate modes
- Pinching while the bottom sheet sidebar is open — pinch should only activate on the media area, not the sidebar
- Very small pinch movements (< threshold) should be ignored to prevent accidental zoom
Parent Issue
Part of #74 — More controls for media in lightbox
Problem
On mobile, users expect to pinch-to-zoom on images just like in native photo viewers. The zoom infrastructure from the fit mode & zoom sub-issue provides the scale/pan state, but touch gesture recognition needs dedicated handling.
Proposed Design
lightboxZoomMin/lightboxZoomMaxbounds from settingsAcceptance Criteria
lightboxZoomMinandlightboxZoomMaxfrom settingsEdge Cases