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

Add onStartShouldSetPanResponder: () => true so animation starts on… #1

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

Conversation

joshuapinter
Copy link

… press down.

Without this, the user needs to start moving the object for the scale transform to occur.

In my experience, pressing down on an object and having that object "pop out" of the page (via the scale transform) is a really nice indicator that we are now dragging the object.

Adding onStartShouldSetPanResponder: () => true does just that.

You might want to update the web page as well: http://mindthecode.com/getting-started-with-the-panresponder-in-react-native/

Thanks again for writing this. With your help I was able to cross a big "unknown" off my project's list.

… press down.

Without this, the user needs to start moving the object for the scale transform to occur. 

In my experience, pressing down on an object and having that object "pop out" of the page (via the scale transform) is a really nice indicator that we are now dragging the object. 

Adding `onStartShouldSetPanResponder: () => true` does just that.
@joshuapinter
Copy link
Author

To compare:

Here is the what it looks like without onStartShouldSetPanResponder: () => true:

before

And here is what it looks like with onStartShouldSetPanResponder: () => true:

after

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