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 counter-orientation-direction operations on some devices #77

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

Conversation

Krupson
Copy link

@Krupson Krupson commented Sep 16, 2020

I have noticed that on some devices the counter-orientation-direction operations does not work.
After short debugging I have noticed that dx and dy are equal to 0 at the beginning of dragging on these devices and therefore it's not triggering the Math.abs(dx) > Math.abs(dy) condition. In order to fix this issue I have added zero check on dx and dy.

Tested on Samsung Galaxy S8, Samsung Galaxy S20+, Samsung Galaxy A6, Sony Xperia Z2, Huawei P40 Lite and Google Pixel 4. Problem occured only on last two of them. Now it works good on all these devices.

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