fix(core): arm doubleClickDragZoom by coordinating the dblclickdrag recognizer#10417
Closed
charlieforward9 wants to merge 1 commit into
Closed
fix(core): arm doubleClickDragZoom by coordinating the dblclickdrag recognizer#10417charlieforward9 wants to merge 1 commit into
charlieforward9 wants to merge 1 commit into
Conversation
…blclick The DoubleClickDrag recognizer was registered with no recognizeWith relationship, so mjolnir's manager called reset() on it as soon as the click/dblclick recognizers activated during the first tap. That wiped its cross-tap memory (_lastTap) before the pointer-up was processed, so the second press never matched a prior tap and the gesture never armed -- doubleClickDragZoom silently fell through to pan. Registering it to recognize simultaneously with click/dblclick keeps its tap memory intact; it then becomes the active recognizer on the second press, which also suppresses the competing pan (no more zoom+pan jitter). Verified end-to-end via headless input: double-click-drag now zooms with no pan drift, while plain drag still pans and plain double-click still zooms one step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
|
re-opening on same-repo PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
doubleClickDragZoom(added in #10327, enabled by the mjolnir.js 3.0.1 upgrade in this PR) never fires — a double-click-drag silently pans instead of zooming.Cause
dblclickdragwas registered inRECOGNIZERSwith norecognizeWithrelationship. mjolnir's manager callsreset()on any non-active recognizer that can't recognize-with the currently active one. So the momentclick/dblclickactivate during the first tap,DoubleClickDrag's cross-tap memory (_lastTap) is wiped before the pointer-up is even processed. The second press then never matches a prior tap, the gesture never arms, and the drag falls through topan.Fix
Register
dblclickdragto recognize simultaneously withclick/dblclick. Its tap memory survives the first tap; it then becomes the active recognizer on the second press, which also suppresses the competingpan(no zoom+pan jitter).Verification (headless pointer input)
4.0 → 5.2, latitude drifts only monotonically (anchored-zoom pivot), no pan sawtooth.cc @Pessimistress
🤖 Generated with Claude Code