-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
[FEATURE] Prevent pinch move while pinch zooming #1905
Comments
Hey @JaffaKetchup, sorry to tag you, it's been quite a while since I posted this. Users basically can't use the pinch zoom feature on laptops with no external mouse, which is really frustrating for 'em. Do you plan on fixing this anytime soon or should I dip my head into the source and try to do it myself? I see that you are overhauling the gesture system currently so I'm not sure if trying it myself is the best idea since it will be reworked anyway? If I should, could you give any pointers of how to get started with this? Thanks 😃 |
Hey @translibrius, I'm not sure whether this is a bug or a design question. When using the scroll wheel, or double tapping, the zoom occurs at the pointer location (cursor or tap location). However, it looks like the trackpad is trying to do this (at the cursor location), but it feels kinda broken (as your video shows). I guess the question is whether the trackpad should zoom to the cursor location, or to the center of the map. I'm not sure how to detect whether there is a cursor or not, but maybe that's possible and useful? I'm not quite clear on which you'd prefer? The work on gesture and event overhaul has been dormant for a while now, so feel free to have a dig yourself. Most of the code should be in the The code concerned is probably: flutter_map/lib/src/gestures/map_interactive_viewer.dart Lines 575 to 641 in 4dc3bca
But I cannot be sure whether it also is used for touchscreen right now - I'll need to check. Indeed, replacing line 640 to |
Thank you for the detailed response! Indeed, I've set the line 640 to I will look into the source more on the weekends in my spare time to try and better understand how it all works under the hood to hopefully make a solution. Perhaps an easy fix would be some interaction flag like I will let you know if I find something useful about this :) |
What do you want implemented?
Hey, love the package!
Simillar to #1396 I would love to have a way to disable pinch move while zooming. This is specifically an issue on a laptop's trackpad (windows tested) when a user wants to zoom in via trackpad, but that pans the map somewhere else.
What other alternatives are available?
Simply disabling the pinch move flag, however then the user will be unable to move the map with two fingers.
Can you provide any other information?
I have video footage for refrence. As you can see the map moves when zooming.
example.mp4
I love this package, so I might take a look at potentially doing a PR for this if it's not too complicated.
Severity
Annoying: Currently have to use workarounds
The text was updated successfully, but these errors were encountered: