react-svg-pan-zoom icon indicating copy to clipboard operation
react-svg-pan-zoom copied to clipboard

Big size of Svg not working proper

Open jaykhatriwebdesigner opened this issue 7 years ago • 4 comments

Hi,

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

  • svg not load from center point
  • when i click on fittoscreen its show me half of svg

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

jaykhatriwebdesigner avatar Apr 26 '18 08:04 jaykhatriwebdesigner

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/

chrvadala avatar May 03 '18 16:05 chrvadala

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

jaykhatriwebdesigner avatar May 04 '18 06:05 jaykhatriwebdesigner

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 avatar May 08 '18 08:05 chrvadala

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

chrvadala avatar May 08 '18 08:05 chrvadala