Conversation
drichard
requested changes
Sep 19, 2026
| // | ||
| // Zoom is a vertical gesture, but the plugin reports the horizontal delta as | ||
| // the generic delta when there is no vertical movement, so a sideways swipe | ||
| // would zoom. Prefer deltaY, falling back to delta for older plugin builds |
Owner
There was a problem hiding this comment.
I don't understand the fallback because we vendor the library, don't we? So we are in control of the version.
Author
There was a problem hiding this comment.
You're right. I added the fallback defensively to keep the change compatible with other plugin versions, but that's unnecessary here since mindmaps vendors jquery.mousewheel 3.0.4 and that version always passes deltaY as the fourth argument.
I've simplified it to use deltaY directly and ignore the event when it is zero. Thanks for catching that.
jquery.mousewheel reports the horizontal delta as the generic delta when there is no vertical movement, so a sideways two-finger trackpad gesture zoomed the map. The vendored jquery.mousewheel 3.0.4 always passes the vertical delta as the fourth handler argument, so use it directly and ignore the event when there is no vertical movement.
erseco
force-pushed
the
upstream/fix-horizontal-wheel-zoom
branch
from
September 19, 2026 12:13
ee80c2f to
c01c205
Compare
This branch has not been deployed
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.
Summary
Ignore horizontal-only wheel gestures when zooming the mind map.
The vendored
jquery.mousewheel3.0.4 passes both horizontal and vertical deltas to the handler. The current code uses the genericdelta, which can represent horizontal movement when there is no vertical movement, causing sideways trackpad gestures to zoom the map.This change uses the vertical
deltaYdirectly and ignores the event when there is no vertical movement.No dependency or architectural changes are involved.
Behaviour
Before:
After:
Validation
npm ci && npm run buildsucceeds with the project's existing dependencies.