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

Changed behavior of two finger swipe gesture #5908

Closed
RubenKelevra opened this issue Sep 18, 2024 · 4 comments
Closed

Changed behavior of two finger swipe gesture #5908

RubenKelevra opened this issue Sep 18, 2024 · 4 comments
Labels

Comments

@RubenKelevra
Copy link
Contributor

I noticed that there's a difference between 58.22 and 59 in terms of interpretation of the two finger gesture:

In 58.22 the interpretation is very relaxed, you can pan with one finger and add a second one after a second to tilt.

In 59 both fingers need to be put on screen basically at the same time, otherwise the view will jitter weirdly back and forth between map rotation inputs of both fingers.

This makes it pretty hard for me, without an motion disabilities, to tilt on the first try. I can basically only do it with two thumbs, otherwise I can't seem to put my fingers so well times on the screen.

This is probably an even more noticeable issue for anyone with motion disabilities using the app.

Screenshots

New behavior:
https://github.com/user-attachments/assets/4fe7926b-0849-4eb4-8d42-a7ed272ced8a

Old behavior:
https://github.com/user-attachments/assets/c2dd9af2-8da1-4154-b475-2b1a094810a4

How to Reproduce

  • Place one finger on the screen
  • move it down or up for one second
  • place another finger on the screen
  • continue the movement with both fingers

Expected Behavior
The old behavior was excellent, it should be kept.

Versions affected
Android 12
SC 59

@mnalis
Copy link
Member

mnalis commented Sep 18, 2024

related comment: #5844 (comment) ("shove" is that two-finger tilt action AFAIK)

@westnordost
Copy link
Member

westnordost commented Sep 18, 2024

So, the issue is that the rotate gesture is too sensible, i.e. rotation is detected before shove.

I experimented with setting the
map.gesturesManager.shoveGestureDetector.pixelDeltaThreshold
to different values from the default (16 dp).

I was unable to find a value that would always shove when I wanted it to shove and would always rotate when I wanted it to rotate.

  • 4dp ~always shoved when I wanted to shove, but often triggered shove when I wanted to rotate
  • 8dp ~always rotated when I wanted to rotate, but rarely triggered rotate when I wanted to shove

Given that I also doubled the sensitivity of the rotate gesture detector in frame of the issue linked above, it makes sense to also double the sensitivity of the shove gesture, as these both gestures are mutually exclusive.

So, with 8dp threshold it is more likely to accidentally trigger the rotate gesture over the shove gesture, which is fine, because rotate is what users do usually more often than tilt.

@RubenKelevra
Copy link
Contributor Author

Thanks!

@RubenKelevra
Copy link
Contributor Author

I can confirm that it's fixed :)

Behavior is still a bit different, but it's now possible to consistently tilt without causing weird jittery rotations!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants