Skip to content

Mobile layout + touch gestures for the photo-geolocation app#41

Open
itamarwe wants to merge 2 commits into
masterfrom
claude/mobile-photo-geolocation-layout-vau4jn
Open

Mobile layout + touch gestures for the photo-geolocation app#41
itamarwe wants to merge 2 commits into
masterfrom
claude/mobile-photo-geolocation-layout-vau4jn

Conversation

@itamarwe

@itamarwe itamarwe commented Jun 8, 2026

Copy link
Copy Markdown
Owner

The GeoPhoto tool was desktop-only (a three-pane flex row). This makes it usable on phones.

Mobile layout

On narrow screens (≤768px) the three-pane layout collapses to one pane at a time, chosen by a segmented tab bar:

  • 📷 Photo — the upload / photo pane
  • 🗺️ Map — the map canvas
  • 📍 Anchors — the sidebar's Anchors + Pose Estimation panels (stacked)

The third tab is needed because the 320px sidebar can't be always-on at phone width, and the anchor workflow (add → place photo point → place map point) needs those controls reachable.

All three panes stay mounted at all times — only data-mobile-view toggles which is visible — so the map's requestAnimationFrame render loop and each view's pan/zoom state survive switching tabs. Desktop is untouched (the tab bar is display:none above 768px).

Touch gestures

Both the photo view and the map now track multiple active pointers:

  • Pinch to zoom around the gesture midpoint (reuses the existing ctrl+wheel anchor-point math, so the point under your fingers stays put)
  • Two-finger pan with the midpoint's drift
  • One-finger pan
  • Winding a pinch down to one finger hands the gesture back to panning without a jump, and the final lift of a multi-touch gesture is no longer mistaken for a tap that would drop an anchor

touch-action: none on the photo frame and map canvas keeps these from being eaten by browser scroll/zoom. Mouse pan/click and trackpad zoom are unchanged.

Verification

  • npm run build passes
  • Screenshotted all states with Playwright (desktop unchanged; the three mobile tabs render correctly)
  • Drove real multi-touch via CDP Input.dispatchTouchEvent: on both views, pinch-out zooms in, pinch-in zooms out, one-finger drag pans, and a single tap after a pinch still places an anchor

https://claude.ai/code/session_01Ks6E4VWoN85aX5yQn2Pj5b


Generated by Claude Code

claude added 2 commits June 8, 2026 18:11
On narrow screens (<=768px) the desktop three-pane layout collapses to a
single pane at a time, chosen by a segmented tab bar: Photo, Map, and
Anchors (the sidebar's anchor + pose panels). All panes stay mounted so
the map render loop and each view's pan/zoom state survive switching.
Adds touch-action: none on the photo frame and map canvas so dragging
and tap-to-place work on touchscreens. Desktop layout is unchanged.
Both views now track multiple active pointers. Two fingers pinch to zoom
around the gesture midpoint (matching the existing ctrl+wheel anchor-point
math) and pan with the midpoint's drift; a single finger pans. When a
pinch winds down to one finger the gesture hands back to panning without a
jump, and the final lift of a multi-touch gesture is no longer mistaken
for a tap that would drop an anchor. Mouse pan/click and trackpad zoom are
unchanged.
@vercel

vercel Bot commented Jun 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
itamarwe-github-io Ready Ready Preview, Comment Jun 8, 2026 8:02pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants