15 comments

[ 1.6 ms ] story [ 45.9 ms ] thread
Hi, I'm the developer of this React component. I started this work after I realised that there wasn't any SVG pan zoom component fully written with React. I hope that it will be useful for the community.
Very much so! Thank you for building and releasing this!
Packaging this as a chrome extension would be fantastic. Would be of use when viewing raw SVG files.
Interesting idea. I have never wrote a chrome extension. I will study how to do it.
(comment deleted)
Nice, I think I will use this without React. Thanks
This looks really cool. Can't wait to try it.
Why does svg need this kind of special handling (could be done for a div inside a div and just work for svg)?
You are right, I think that this work could be adapted to work properly with div, but when I started to develop it I was interested to perform this operation only on a SVG image.
Nice! I worked out a little proof of concept a while back for a pan-and-zoom wrapper around any ol' HTML, if that's of any interest: https://github.com/brian-c/react-zoomable I haven't tried it with SVG, but I imagine it'd work fine.
It's great to see other people's solution to these types of challenges in React. We have been implementing something similar for images because the existing components didn't meet our needs. I look forward to digging into your code and seeing how you implemented it.