Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Center zoom on pinch zoom gesture (not just on move gesture) #1543

Merged

Conversation

JosefWN
Copy link
Contributor

@JosefWN JosefWN commented Jun 4, 2023

This should fix the last issue tracked in #1354. #1081 seems to omit the pinch to zoom case. I tried adding it and it seems to be working on MacOS now, but I haven't tested extensively to see if this change breaks anything else.

EDIT: To clarify, on MacOS, _pinchMoveStarted is not true when I'm pinching to zoom. Combined gestures are not supported on the touchpad, so it's either zoom, move or rotate.

This is also taken into account here, for example: https://github.com/fleaflet/flutter_map/blob/master/lib/src/gestures/gestures.dart#L458

@JaffaKetchup JaffaKetchup self-requested a review June 4, 2023 10:04
@JaffaKetchup JaffaKetchup linked an issue Jun 4, 2023 that may be closed by this pull request
9 tasks
Copy link
Member

@JaffaKetchup JaffaKetchup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @JosefWN. I can't test this myself, but if this same technique is used elsewhere, I don't see why it shouldn't be used here.

@JaffaKetchup JaffaKetchup merged commit d8e52ac into fleaflet:master Jun 4, 2023
@JosefWN JosefWN deleted the fix-center-gesture-pinch-zoom-macos branch June 4, 2023 13:10
@ibrierley ibrierley mentioned this pull request Jun 4, 2023
5 tasks
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.

[BUG] MacOS: Multitouch introduction causes issues (Flutter 3.3.0)
2 participants