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
205 stars 57 forks source link

Using panresponder inside zoomableView #37

Open zebaroni opened 2 years ago

zebaroni commented 2 years ago

Hey guys,

I have a zoomable view of size 500x500 and inside of it i have an image. I need to mark this image and the marker needs to be draggable. However, I cant figure out how to put a pan responder (draggable view) inside the zoomable view because the pan gesture propagates to the parent (zoommable view), already tried to create the panResponder with an absolute position and high zIndex but no luck.

Another thing i tried and failed was to create an absolute positioned container with the same size as the zoomable view (500x500) and put the panResponder on top of this one, it worked, but i cant figure out how to translate the marker coordinates with the Offset and ZoomLevel of the zoommable view.

So, is there any way to use a pan responder inside the zoomable view?