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

Added check to see if element is only being dragged horizontaly #80

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

Conversation

shivankacker
Copy link

@shivankacker shivankacker commented Mar 30, 2023

Why this PR?

For layouts where there are horizontal as well as vertical scrolls, the pull down to refresh does not working properly as it assumes I am pulling down when I just want to scroll horizontally.

What was the problem, technically?

The problem was that when you start touch from lets say [0,0] to [-30,-10] you will be dragging more to the left side than down and don't want to trigger the pull to refresh for that.

What did I implement?

I made sure that I trigger pull to refresh while dragging only when the distance dragged vertically is more than distance dragged horizontally.

Demo

Before:
ezgif-1-9096e34c7c

After:
ezgif-1-03700654bc

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.

1 participant