-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Manual gesture receiving touch events #2188
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
Conversation
Fixing interaction manager
| if (!event.allTouches || !event.changedTouches || !event.touchEventType) { | ||
| return; | ||
| } |
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.
This means that mouse and stylus will not send touch events right?
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.
Yes, they don't send touch events by default. We can try mapping pointer events to touch events, but I think that's something that should be done in another PR
…#2247) ## Description Until this PR, `PointerTracker` was using `if (pointerId) {...}` to check whether pointerId was provided as argument. Right now, touches are handled by `TouchEvents` and by changes in [this PR](#2188), IDs of touches are mapped to range 0-20. Because of that, when we call `tracker.getLastX(id)`, where `id = 0`, it doesn't return X coordinate of touch with ID 0, but X coordinate of last moved pointer. This makes some handlers malfunction. ## Test plan Tested on example app
Description
This PR introduces first step to make
ManualGestureHandleravailable on web. Touch events are now being sent to handlers with propneedsPointerData, so it's possible to interact with them. However, there's still no option to manually manage state of this handler, as it requires more changes in state management logic.Test plan
Tested on example app