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

ignore touch event if it does not originate from this joystick instance #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ftylitak
Copy link

As described in #32, in cse of multiple joysticks, releasing on joystick triggers onTouchEnd to all joysticks.

Using the changes in this PR, the joystick keeps the last touch event coordinates and accepts the onTouchEnd event only if the final touch coordinates deviate at most 10px.

I used this change in one of my projects and it works. I am nor really source about edge cased, but it remained to be examined.

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.

None yet

1 participant