-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
Add a method to enable / disable cooperativeGestures #2057
Comments
I generally understand the request and agree this is needed. |
Thank you for your feedback, I will try to propose a clean PR soon to add this feature. |
Fixes maplibre#2057 Also disable cooperative gestures in fullscreen, using these new methods (Fixes maplibre#1488)
i am also looking forward to this feature. But also would be awesome to change the text for the informational screen dynamically. For example if the user changes language. something like:
a set-named function would feel like to fit to other option updates like setCenter or setMaxBounds thank you for all your effort |
That's an excellent point. |
I was really thankfull, that this option was there, but now its gone? So i cant change cooperativeGestures dynamically? |
It's in a different place, see changelog. |
oh man... thank you thank you for your fast answer. |
Motivation
I have a button on my map to toggle a full screen mode (position:fixed; width+height:100%).
My use case is that I need to have cooperativeGestures enabled when my map is inlined somewhere in my page, but I want to disable it when the full screen mode is enabled.
There is currently no clean way to enable or disable cooperativeGestures programmatically.
This is the dirty way I have to do when I toggle cooperativeGestures :
I can live with that, but I won't sleep well 🥲
Design Alternatives
We could have something like that :
Or (same way than interactions) :
If it's too complicated, please at least improve the part in TouchPanHandler. Instead of computing TouchePanHandler._minTouches in the constructor, compute it on the fly by checking if cooperativeGestures are still enabled or not.
The text was updated successfully, but these errors were encountered: