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

Second double tap #39

Closed BaronHandsome closed 11 months ago

BaronHandsome commented 2 years ago

Hi. Is it possible to make double-tap again return the original size of the image and not continue to increase it?

dan-doyon-endear commented 1 year ago

Would like to have this feature or recipe to do this too.

elliottkember commented 1 year ago

This is a good idea.

We currently use it as a "map" style component, where users can keep zooming in, but I can imagine a prop like zoomMode: map" | "image" that could determine whether it zooms in further or resets to zero.

thomasttvo commented 1 year ago

@BaronHandsome you can try setting the maxZoom a little lower. Double tapping will revert back to 1 if it already reaches maxZoom.