intergalacticspacehighway / react-native-reanimated-zoom

Component for zooming react native views. 🔎
MIT License
315 stars 19 forks source link

Double Tap Gesture Translation X & Y always return to 0 #5

Closed putuoka closed 2 years ago

putuoka commented 2 years ago

always X:0 & Y:0 when double tap and then pan make it jump to center in zoom pan

translationX.value = withTiming(
            -1 * (maximumZoomScale * (e.x - viewWidth.value / 2)),
          );
          translationY.value = withTiming(
            -1 * (maximumZoomScale * (e.y - viewHeight.value / 2)),
          );
intergalacticspacehighway commented 2 years ago

@putuoka Pushed a fix. Can you try 0.1.2?

putuoka commented 2 years ago

@putuoka Pushed a fix. Can you try 0.1.2?

perfect! Thank you!