root-two / react-native-drawer

React Native Drawer
MIT License
2.54k stars 390 forks source link

Any way to close the drawer panel by swiping the panel itself? #307

Open rohitgoyal opened 7 years ago

rohitgoyal commented 7 years ago

Hi Is there any way to close the drawer panel by swiping the drawer panel to the closing side. Currently it only gets closed if i swipe it through the offset area.

screen shot 2017-07-10 at 2 33 47 pm

In the above screen i want to close the right side drawer by swiping the drawer itself to the right. But not using the tap on the drawer. Thanks in advance.

dopey2 commented 7 years ago

You can make it using Gesture Responder System , when you detect a gesture you manually open/close the drawer!!! http://facebook.github.io/react-native/releases/next/docs/gesture-responder-system.html#gesture-responder-system

Cassendra4 commented 6 years ago

I'm facing this issue, can someone help me with how to close the drawer by swiping the drawer itself?

mmarovich commented 6 years ago

You can make it using Gesture Responder System , when you detect a gesture you manually open/close the drawer!!! http://facebook.github.io/react-native/releases/next/docs/gesture-responder-system.html#gesture-responder-system

Dead link, unfortunately. Yeah, it would seriously be nice to just make the pan mask the drawer itself, instead of designating a ratio.

Makgora commented 4 years ago

negotiatePan on properties fixed that for me