Skip to content
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

Cache averages in PointerTracker #2212

Merged
merged 6 commits into from
Sep 13, 2022
Merged

Cache averages in PointerTracker #2212

merged 6 commits into from
Sep 13, 2022

Conversation

m-bert
Copy link
Contributor

@m-bert m-bert commented Sep 9, 2022

Description

This PR adds caching average coordinates in PointerTracker. Some handlers (like pan) send average values in native event. The problem is, that these events are being sent after pointers are removed from tracker. This means, that tracker may return NaN as averege, when received event was pointerup. In that case, cached value should be returned.

Test plan

Tested on example app

@m-bert m-bert merged commit ca71f48 into main Sep 13, 2022
@m-bert m-bert deleted the @mbert/chat-head-fix branch September 13, 2022 08:23
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.

2 participants