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 use responderNegotiate ? #28

Open
shinnachot opened this issue May 20, 2019 · 1 comment
Open

How to use responderNegotiate ? #28

shinnachot opened this issue May 20, 2019 · 1 comment

Comments

@shinnachot
Copy link

Default value Drawer on right 20% area on screen in right Drawer, So i need to change this value from 20% to 10% i look at manual and see this function responderNegotiate i trying to
responderNegotiate={(gestureState) => console.log(gestureState) }
it's response somthing i dont understand any one help ?

@JeremyBradshaw7
Copy link

Seems you just have to evaluate the gestureState and return true or false depending on whether you want the gesture to be recognised or not, eg to get it to swipe open right menu only if dragging from the last 30 points:

responderNegotiate={(evt, gestureState) => {
  return Dimensions.get('window').width - (gestureState.moveX - gestureState.dx) < 30;
}}

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

2 participants