booyeu / react-native-reanimated-viewer

A high performance image viewer in react-native created from react-native-reanimated.
130 stars 12 forks source link

[Feature request] Disable close on tap #19

Closed gregamann closed 1 year ago

gregamann commented 1 year ago

Hi ! That's a nice project, your rock ! Is there a way to allow closing image-viewer only on swipe up or bot ?

I accidentally often close viewer "on simple tap" ^^ Thanks a lot

llr101 commented 1 year ago

Thank you for your approval You can try v1.3.0 & shouldCloseViewer={({gesture}) => gesture !== GestureEnum.TAP}

gregamann commented 1 year ago

@BooYeu Thanks a lot, that's almost perfect !

It seems GestureEnum is not exported, so I have to do this : shouldCloseViewer={({ gesture }) => gesture !== 'TAP'}