openspacelabs / react-native-zoomable-view

A view component for react-native with pinch to zoom, tap to move and double tap to zoom capability.
MIT License
212 stars 58 forks source link

fix couldCallSwipeEvent from returning false when not all props are provided #97

Closed jaredbothwell closed 8 months ago

jaredbothwell commented 8 months ago

Fixes https://github.com/openspacelabs/react-native-zoomable-view/issues/96

onSwipe, onSwipeUp, onSwipeDown, onSwipeLeft, and onSwipeRight are all optional props for ReactNativeZoomableViewWithGestures but couldCallSwipeEvent() returns false when one of these props is not provided. This PR allows couldCallSwipeEvent to return true if at least one of these props are provided.