Closed stopachka closed 2 years ago
Hey team, right now, if we do the following:
In zoomTo(https://github.com/openspacelabs/react-native-zoomable-view/blob/master/src/ReactNativeZoomableView.tsx#L930),
zoomTo
The check to see if it's a valid zoom is
newZoomLevel >= this.props.maxZoom || newZoomLevel <= this.props.minZoom
But this would mean that it's not possible to "reset" to the minZoom:
<ReactNativeZoomableView minZoom={1} ref={zoomableRef}>...</ReactNativeZoomableView> ... zoomableRef.current!.zoomTo(1) // fail
Should this check of < and >, instead of <= and >= ?
<
>
<=
>=
@stopachka Seems like it would work! Would you mind creating a pull request with this change?
Should be fixed in #34
Hey team, right now, if we do the following:
In
zoomTo
(https://github.com/openspacelabs/react-native-zoomable-view/blob/master/src/ReactNativeZoomableView.tsx#L930),The check to see if it's a valid zoom is
But this would mean that it's not possible to "reset" to the minZoom:
Should this check of
<
and>
, instead of<=
and>=
?