-
-
Notifications
You must be signed in to change notification settings - Fork 862
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
multi!: rewrite gesture handling #1809
base: master
Are you sure you want to change the base?
Conversation
non breaking commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Double tap + drag zoom gesture emits
MapEventMove
rather than a zoom gesture - Double tap + drag zoom gesture emits 'Unknown' event on completion - need to update example app
2024-02-10.14-34-03.mp4
- Fling gesture can no longer be toggled in gesture app
-
Two-finger drag checkbox doesn't appear to make any difference on Windows 11 trackpad (Lenovo). Is two-finger drag intended for mobile?
-
Trackpad zoom gesture toggle has no effect, and cannot zoom with trackpad. Instead, scroll gesture controls the trackpad zoom.
2024-02-10.14-47-37.mp4
-
The new system where events aren't emitted unless a callback is directly assigned to listen to that event kinda breaks the whole point of the
onMapEvent
callback. -
Defining/undefining a specific callback does not change whether the event was emitted from the original state (state is not changed properly).
- Double tap zoom gesture has no delay when performed on mouse (which is good), but there is delay when gesture performed on trackpad.
I'm a little concerned that we're splitting the mouse, touchpad, and mobile/touchscreen gestures apart. As far as I'm concerned the touchpad gestures should be the same as the mobile/touchscreen gestures. Is that what you're aiming for as well? For example, the pinch zoom gesture is the same pinch that's done on the trackpad.
This is expected behaviour. Since the driver release date is 2006 I assume that your touchpad doesn't support the new gestures of flutter.
There was up to this point no intention for a two-finger drag on trackpads and I'm not able to perform this gesture on other map libraries. Is this another flutter_map specific gesture?
Please note that events haven't been emitted concistently. normal tap gestures have while the double tap hasn't. The implementation in this pr only registers callbacks if they are needed and therefore only emits an event if the user listens to it. Maybe I understood the
I experience the same behaviour for master. Have you really experienced different behaviours between master and this pr?
Touchpads and touchscreens have different gestures. For example: Run the app from the master branch and do a doubleClickDragZoom gesture. On touchpad this zooms the map in and out to allow zooming with one finger. On touchpad however this gesture moves viewport which is the expected touchpad behaviour. If your goal is it to provide the same gestures on trackpad, touchpad and mouse, a high level implementation is not sufficient and we need to use a RawGestureDetector.
The classic windows zoom gesture is to move two fingers vertically on the touchpad. You can use this gesture on the web live demo: https://demo.fleaflet.dev/ More advanced touchpads and mac touchpads support the pinch zoom gesture as well. But we can't assume that this gesture is supported by any touchpad. |
Just a quick update to this pull request for everyone who's following along. It was decided internally to collect all gestures with their supported platforms and input devices to get a better overview. I created a spreadsheet for this: Looking forward for some feedback or comments to be able to continue. |
Moved the
gesture-rewrite
branch to the flutter_map repo to have pull requests for this branch on here too.For previous discussions see #1733.
Changes in addition to the ones listed in #1733:
doubleTapDragZoom
gesture