garblovians / react-native-svg-pan-zoom

Pan-zoom via two-finger "Google Maps"-style pinch and drag gestures
MIT License
26 stars 23 forks source link

Redraw SVG after zoom? #1

Closed MisterPeddler closed 6 years ago

MisterPeddler commented 6 years ago

Hello,

Just want to say thanks for making this. I happen to be working on something that needs this very thing. It's great. Responds quickly and smoothly to touches. My attempts to build something from scratch haven't turned out as great as yours.

However, I was hoping this package would automatically redraw SVGs after (or even better, during) a zoom event. As it currently stands a zoomed in SVG shows only the now blurry .png that react-native-svg creates.

Does package expose the current zoom as determined in panResponderMove?

Thanks!

LukasHedegaard commented 6 years ago

Hey, thank you for showing interest!

I just release 0.1.2 with exposed 'onZoom' callback, that you can use to get scaling information. Regarding the blurry .png's, I'm afraid redraws during zoom wouldn't be very performant. Instead, I recommend you leave maxScale = 1 and instead increase you SVG element sizes.

Hope that helps!

MisterPeddler commented 6 years ago

Thanks so much!