-
Notifications
You must be signed in to change notification settings - Fork 32
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
SwipeUp call's SwipeLeft #18
Comments
Hi @Nalyvaiko, when swiping, if you have any vertical movement, It's up to you to disable one or another if you need. You can do that by cancelling the handler through some calculations on your Something like the code below would solve your problem: onSwipeMove = (delta) => {
this.isHorizontal = delta.x > delta.y;
}
onSwipeLeft = () => {
if (!this.isHorizontal) {
return;
}
// your handler to swipe left
}
onSwipeDown = () => {
if (this.isHorizontal) {
return;
}
// your handler to swipe down
} |
Closing due to inactivity. Feel free to reopen if you need. |
I ran across this issue while using this package (thanks!) and I wanted to share that I think the above code should modified to handle both left and right horizontal movements: onSwipeMove = (delta) => {
this.isHorizontal = Math.abs(delta.x) > Math.abs(delta.y);
} |
Why SwipeUp call's SwipeLeft and SwipeDown calls SwipeRight ??? How to fix that???
The text was updated successfully, but these errors were encountered: