Skip to content

Fix pinch zoom drifting away from the fingers on touch screens - #7

Merged
pythonicode merged 2 commits into
mainfrom
feat/responsive-layout
Oct 14, 2026
Merged

pythonicode merged 2 commits into
mainfrom
feat/responsive-layout

Conversation

@pythonicode

Copy link
Copy Markdown
Owner

Summary

Brings the pinch-zoom fix into main. PR #4 merged into feat/responsive-layout, but that branch never reached main. This PR carries only the pinch commit, so it can merge cleanly.

See #4 for the cause and fix: the stage drag is stopped during a pinch, and the anchor maths is a single tested function (pinchViewport).

Testing

🤖 Generated with Claude Code

pythonicode and others added 2 commits October 14, 2026 11:16
Two things made the zoom point drift away from the fingers on touch screens:

- A one-finger pan (Konva stage drag, on the Pan tool) could still be running
  when a second finger landed. The drag and the pinch then both moved the
  stage. The stage drag now stops when a pinch starts and is restored after.
- The pinch anchor added the finger movement a second time, and the fallback
  path mixed layer and map coordinates for rotated maps. The step is now a
  single pure function (pinchViewport) that keeps the stage point under the
  previous centre under the new centre, starting from what is on screen.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Fix pinch zoom drifting away from the fingers on touch screens
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
analysis Ready Ready Preview Oct 14, 2026 9:41am UTC

@pythonicode
pythonicode merged commit 99c95b9 into main Oct 14, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — d527e753 Deployed Oct 14, 2026 by vercel[bot]
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.

1 participant