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
189 stars 57 forks source link

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

Closed jaredbothwell closed 3 months ago

jaredbothwell commented 3 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.