Fit to viewer does not fit all image inside
See original GitHub issueHi:
I’ve met this case when the viewer is square and a portait svg such as 500px * 800px, I invoke fitToViewer
but only got its width fitted. Could I fit entire svg inside the viewer? Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:7 (7 by maintainers)
Top Results From Across the Web
react-native - Fit Image in containing View, not the whole ...
The problem is that resizeMode='contain' seems to fit to the width of the screen or at least some higher level container, I need...
Read more >problem re-sizing a photo to fit in the viewer panel
can anybody help me to re-size a photo to fit, the videos are fine, but not the photos. when I drag and drop...
Read more >gpicview doesn't fit image to window size - Launchpad Bugs
gpicview has a button to 'fit image to window size'. It does nothing. Big windows, small windows, images always displayed original size.
Read more >can photo viewer fit to screen? - Microsoft Community
No photo viewer Microsoft has ever built will show an image higher than the images actual true size. They all will "fit down"...
Read more >image viewer resize and fit to window size - Google Groups
When i resize the window canvas size has to be change and fit to current window and the look should be same in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
https://jsfiddle.net/f67qyfsd/10/
I moved the
<rect>
x property over to500
because my situation was more about the elements inside the SVG being cut off and not the SVG tag itself. In other cases your default fitToViewer() seems to work well.I also needed this feature. I wrote some “hacky” code using
this.Viewer.fitSelection()
. Its not pretty but it gets the job done. Run this after the component is mounted (you need a reference to theViewer
).