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

How to implement "snap" functionality #25

Open
Maximell opened this issue Feb 26, 2018 · 0 comments
Open

How to implement "snap" functionality #25

Maximell opened this issue Feb 26, 2018 · 0 comments

Comments

@Maximell
Copy link

I am using this library to move images in an app - but I am having some trouble implementing 'snap' functionality. Desired behaviour is for the image to be moveable until it reaches a point where it will "stick". I have tried disabling "draggable" in the onChange event when it meets my conditions, but this causes the image to be reset to its original position before the start of the gesture, which looks bad.

One option might be to re-position the image in the onRelease function, but I would really prefer for this functionality to happen while the image is being dragged.

If someone else has accomplished similar behaviour using this library, or has suggestions, I would be all ears. Without this functionality I am probably going to have to go back to the native PanResponder components, which I would really rather avoid.

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

No branches or pull requests

1 participant