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
191 stars 58 forks source link

Double click causes crash #19

Closed aliberski closed 2 years ago

aliberski commented 2 years ago

Double click crashes the app if maxZoom is set to null.

null is not an object (evaluating ‘maxZoom.toFixed’)

elliottkember commented 2 years ago

This seems to be caused by maxZoom.toFixed here: https://github.com/openspacelabs/react-native-zoomable-view/blob/master/src/ReactNativeZoomableView.tsx#L852

thomasttvo commented 2 years ago

@aliberski we don't support null for maxZoom, and if you pass in undefined it'd fallback to the default value of 1.5. For your use case, I think you can use Infinity.