Skip to content

Conversation

@m-bert
Copy link
Contributor

@m-bert m-bert commented Aug 29, 2022

Description

This PR introduces first step to make ManualGestureHandler available on web. Touch events are now being sent to handlers with prop needsPointerData, 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

Comment on lines +411 to +413
if (!event.allTouches || !event.changedTouches || !event.touchEventType) {
return;
}
Copy link
Member

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?

Copy link
Contributor Author

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

@m-bert m-bert merged commit ca17867 into main Aug 30, 2022
@m-bert m-bert deleted the manual-gesture-support branch August 30, 2022 11:05
m-bert added a commit that referenced this pull request Sep 26, 2022
…#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants