chrvadala / react-svg-pan-zoom

:eyes: A React component that adds pan and zoom features to SVG

Home Page:https://chrvadala.github.io/react-svg-pan-zoom/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

scaleFactorMin scaleFactorMax not working

timohausmann opened this issue · comments

Hey, I need help with limiting the scale factor.
I want: zoom out not smaller than 1x resolution. Zoom in not further than 5x. For that, I would expect this API:
scaleFactorMin={1} scaleFactorMax={5}

I find no example using those props.
I tested many values, but nothing seems to have any effect at all.
Is it even possible to set both min and max?

I also use node.fitToViewer('center', 'center'); if this has any side effects.