-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix multitouch on android, behaving in unexpected way #714
Fix multitouch on android, behaving in unexpected way #714
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Looks good, left some inline comments.
if (isMultitouchKeyPressed && !isKeydown) { | ||
sendMultiTouch(touchPoint, "Up"); | ||
setIsPressing(false); | ||
} |
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.
would feel more logical if we merged this with the previous condition. Now the first if handles alt and the next one handles shift. If we move it up it'll be kept that way. Then we can only test for down/up and handle that differently.
Also, I'm not a huge fan of the name isMultitouchKeyPressed
as in this particular check it isn't pressed but lifted.
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.
I'm not sure if I'm getting the shift/alt part. Next if takes care of shift part those two test if multitouch should be activated or not.
I didn't want to merge to avoid nesting ifs, as imo those can be harder to follow. But I split it even more in #716. Where we basically get if (start multitouch)
and if (finish multitouch)
, does it look better?
I definitly agree with confusing name, although I would update it in #716.
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.
Fixes #677
Multitouch has been behaving unexpectedly - when releasing alt or mouse, the preview still behaved like in the multitouch mode.
To fix that two fixes are applied:
UP
event and turns off pressing when alt/ctrl is releasedHow Has This Been Tested:
Tested on Android and Google Maps, while using multitouch in IDE.
Multitouch-Before.mov
Multitouch-After.mov