-
-
Notifications
You must be signed in to change notification settings - Fork 860
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 #1733
Conversation
d32fcff
to
d5d3259
Compare
non breaking commit
9a2416f
to
95a25b4
Compare
add polymorthism to gesture services
* add trackpad zoom gesture to EnabledGestures, as event and as service * split both trackpad gestures into two services * trackpad zoom center on cursor * rename variable
Marking this pull request as ready to review again.Some thoughts:
|
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.
Still untested, but here's review round 2 :D. Mostly just smaller stuff now, and there's less than it looks at first glance.
I would like for @mootw @TesteurManiak or @ibrierley to also review this PR, and any other community reviews also appricated! It's quite a big PR, so want to make sure I/we haven't missed anything.
Removed this method because it was only used in MapInteractiveViewer.updateGestures and could cause confusion between multi point touchscreen and mutli point trackpad gestures.
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.
-
One bug with cursor keyboard rotation. Rotation is not tracking the cursor properly. I remember having a similar issue when implementing the algorithm initially. Maybe double checking that nothing in the implementaiton itself has changed, and every variable is being changed/reset at the correct points.
-
Cursor keyboard rotation also no longer sets rotation to the angle of cursor immediately when clicking.
2024-01-22.20-38-47.mp4
- One bug with fling event end/finished event not being emmitted (when fling is cancelled with tap (as shown in video), or when finished naturally)
2024-01-22.20-47-41.mp4
- Double tap zoom no longer emits correct event.
PR | Master |
---|---|
! |
- Can no longer fling if drag gesture is disabled. On master, enabling fling without drag would start a fling if the normal conditions were met, but wouldn't drag/move if not, and wouldn't move whilst normal dragging.
- Double tap + drag gesture now loads tiles whilst zooming. master behaviour isn't correct either. The correct behaviour is that new tiles shouldn't load and old ones shouldn't be pruned whilst moving, and the refresh should occur when the gesture completes.
- On tap events and callbacks are no longer triggered.
- Can't seem to perform the new trackpad zoom gesture. Can you explain how to do it?
Still untested on any touch devices. Will perform that testing later.
Branch moved, see new pr here: #1809 |
Main Issue:
Current state of development:
Move gestures
Zoom gestures
Rotate gestures
Gesture callbacks
Changes along the way:
FlutterMapInteractiveViewer
asMapInteractiveViewer
PositionedTapDetector2
secondaryLongPress
,tertiaryTap
,tertiaryLongPress
gesturesonPanUpdate
to detect pan events #1729PointerDownCallback
,PointerUpCallback
,PointerCancelCallback
,PointerHoverCallback
,MapEventCallback
,IsKeyCursorRotationTrigger
MoveAndRotateResult
into a classInteractionOptions.flags
intoInteractionOptions.enabledGestures
that still supports flagsdebugMultiFingerGestureWinner
,enableMultiFingerGestureRace
,rotationWinGestures
,pinchMoveWinGestures
andpinchZoomWinGestures
(use case unclear)/gestures
to/map/gestures
since it part of itInterativeFlagsPage
to more generalGesturesPage
setNorthOnClick
(press CTRL + click to rotate to 0°)CursorRotationBehaviour
CursorKeyboardRotationOptions
, merge gesture withEnabledGestures
and keys option withInteractiveOptions
InteractiveFlags
: pinchMove -> twoFingerMove, doubleTapZoom -> doubleTapZoomIn, rotate -> twoFingerRotateMapEventSource.cursorKeyboardRotation
in favor ofctrlDragRotateStart
,ctrlDragRotateEnd
andctrlDragRotate