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
681 stars 127 forks source link

Big size of Svg not working proper #90

Open jaykhatriwebdesigner opened 6 years ago

jaykhatriwebdesigner commented 6 years ago

Hi,

i am loading big size of svg and then i am getting issues is

i am uploading my code https://jsfiddle.net/jaykhatri18/cay7a6zo/ please check n give me solution if possible

chrvadala commented 6 years ago

It seems that in your demo you set up a scaleFactorMin that is not enough to contain the whole image. With scaleFactorMin={0.0001} it works properly https://jsfiddle.net/3rww8p2o/1/

jaykhatriwebdesigner commented 6 years ago

Hello @chrvadala

its not like this scaleFacttorMin is not issue that i can handle it but my point is when i load large size of svg how can i load it from center point bellow image will may clear my concept : http://www.khatrijay.com/wp-content/uploads/2018/05/issueNeedHelp.jpg

Thank you

chrvadala commented 6 years ago

Unfortunately there isn't a feature to do this. Actually the fitToViewer() method tries to fit the image only on one side and doesn't move the image to the center. Probably I'll add this feature but actually I don't have a target date. Sorry. @jaykhatriwebdesigner great website ;)

chrvadala commented 6 years ago

Duplicate of this https://github.com/chrvadala/react-svg-pan-zoom/issues/65