ascoders / react-native-image-zoom

react native image pan and zoom
MIT License
637 stars 282 forks source link

Slow zoom out with fingers gets stuck on scale less than 1 fix(It wasn't recovering back to scale 1) #153

Open sungsong88 opened 4 years ago

sungsong88 commented 4 years ago

onPanResponderRelease now always knows how to bounce back to scale 1 when it's zoomed out less than scale 1.

Previously, when you are gently zooming out and stopped your gesture slowly, then it holds the picture's scale to the value even if it's lower than 1. You had to zoom-out with flicker your fingers then it will successfully bounce back to scale 1.

After this fix, it will always zoom back to scale 1 after your fingers are released no matter what speed of your fingers was at.

zoom-out-stuck zoom-out-works