DuDigital / 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
241 stars 112 forks source link

Scroll with two fingers #19

Open libasoles opened 5 years ago

libasoles commented 5 years ago

Hi. This library is great, thank you.

Just one thing: scrolling while zooming should be possible. That's the common behaviour if you zoom in chrome by example.

By other hand, in my case i'm not zooming a static image, but a drawing canvas. So, I'm disabling the one finger gestures like this:

handleMoveShouldSetPanResponder = (e, gestureState) => {
    return gestureState.numberActiveTouches === 2;
  };

However, doing that makes it impossible to scroll now. Because I can't scroll with two fingers.

SimonErich commented 4 years ago

Sorry for the late reply. I am working on a new version of this package. I plan to release a beta in about 2 weeks, that should have this functionality.

SimonErich commented 3 years ago

Sorry for the long response times. Unfortunately version 2 of this package never really made sense. I planned on refactoring it, but ended up with something very similar in performance. If somebody has time to pick this issue up, I would really appreciate it.

tlmader commented 2 years ago

Looking for a React Native component that supports two-finger pan and zoom as well.

thomasttvo commented 2 years ago

@tlmader look no further. Check out OpenSpace Labs fork of react-native-zoomable-view. Fyi this is officially the successor of this library.

From the README:

What sets this library apart from the other zoom-pan libraries? This library offers a much better user experience than the others:

  • The ability to zoom and pan at the same time.
  • No jittering during zooming.
  • Zoom center correctly placed at the pinch center - currently this is the ONLY react-native library that offers this.
  • And many other goodies. Check out the documentation below for more details.

Disclaimer: I'm a contributor of the OpenSpace Labs fork