chrvadala / react-svg-pan-zoom

:eyes: A React component that adds pan and zoom features to SVG
https://chrvadala.github.io/react-svg-pan-zoom/
MIT License
684 stars 126 forks source link

Support default zoomLevel #170

Open LukasVerstraete opened 4 years ago

LukasVerstraete commented 4 years ago

Features:

I don't know if this is supported yet, but I have been trying to set a default zoomLevel. My first instinct was to set the scaleFactor prop, but to no avail. Something that worked somewhat was setting the scaleFactorMin, but this is not ideal since it does not allow the user to zoomOut further if necessary.

At the moment we use version 3.6.0. Is this issue something that is fixed in the lastest version? If not is this something that can be supported?

lionkeng commented 4 years ago

Can you not call zoomOnViewerCenter on ReactSvgPanZoom after the parent component has mounted?