msand / zoomable-svg

Pinch to pan-n-zoom react-native-svg components using a render prop.
38 stars 14 forks source link

Re-render the SVG after the zoom-gesture is released #9

Open BabakSamimi opened 5 years ago

BabakSamimi commented 5 years ago

This might sound odd, but is it possible to re-render the SVG after the zoom-gesture is released? This would help a lot with complex SVG-trees considering that the tree is updating 24/7 while you're performing pan-gestures.

What I had in mind was that while you're zooming in the SVG, it'll have to be a bit blurry despite zooming in. However, once the gesture is released, the SVG will have to update.

Thoughts? Possible to do this?

BabakSamimi commented 5 years ago

@msand bump

msand commented 5 years ago

Can probably be done using a scollview / panresponder. Just scale the view containing the svg rather than the svg root, and change the props of the svg on release.

BabakSamimi commented 5 years ago

I'll try to do that, I'll update later on how it went.

msand commented 5 years ago

@BabakSamimi You might want to try this: https://kmagiera.github.io/react-native-gesture-handler/docs/handler-pinch.html