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

Fix multitouch on android, behaving in unexpected way #714

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

maciekstosio
Copy link
Contributor

@maciekstosio maciekstosio commented Nov 8, 2024

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:

How Has This Been Tested:

Tested on Android and Google Maps, while using multitouch in IDE.

Before After
Multitouch-Before.mov
Multitouch-After.mov

Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
radon-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 10:27am

@maciekstosio maciekstosio marked this pull request as ready for review November 8, 2024 14:46
@maciekstosio maciekstosio changed the title fix: stop multitouch when Alt/Ctrl is released Fix multitouch on android, behaving in unexpected way Nov 8, 2024
Copy link
Member

@kmagiera kmagiera left a 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.

Comment on lines +513 to +516
if (isMultitouchKeyPressed && !isKeydown) {
sendMultiTouch(touchPoint, "Up");
setIsPressing(false);
}
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

@maciekstosio maciekstosio Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in: a6dafb2 and a2a0ad8

@maciekstosio maciekstosio merged commit 9069030 into main Nov 13, 2024
4 checks passed
@maciekstosio maciekstosio deleted the @maciekstosio/Fix-unexpected-multitouch-beheviour branch November 13, 2024 10:27
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.

Multitouch on android, behaving in unexpected way
2 participants