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 disable swipe down? #17

Open
ramadhanoo opened this issue May 15, 2019 · 2 comments
Open

how to disable swipe down? #17

ramadhanoo opened this issue May 15, 2019 · 2 comments

Comments

@ramadhanoo
Copy link

No description provided.

@larsyuipo
Copy link

larsyuipo commented Jan 4, 2020

Probably a bit late, but here is a quick fix:

Inside BottomDrawer.js I added an extra property swipeDown which has a default value of true. I then added a check in Animator.js inside handlePanResponderMove:

_handlePanResponderMove = (e, gesture) => { if (this._swipeInBounds(gesture)) {
if(this.props.swipeDown) this.position.setValue({ y: this.props.currentPosition.y + gesture.dy }); } else { this.position.setValue({ y: this.props.upPosition.y - this._calculateEase(gesture) }); } }

Now I can set the swipeDown property to true or false in the BottomDrawer component. When the drawer is in its down position it can't move down only up.

@Quentinb
Copy link

Thanks for this, I suspect it might fix the issue I logged

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

3 participants