SVG export has no size
See original GitHub issueThe SVG root element has no width/height, so they end up drawn at unspecified size. This also means that (as far as I can see) 1x/2x/3x export don’t change anything for SVG.
Maybe something like this:
svgRoot.setAttribute("width", `${width}`);
svgRoot.setAttribute("height", `${height}`);
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to make your SVG's have height and width attributes
SVG's exported from Illustrator CC are 'responsive' by default, in other words there is no height or width attributes, no dimensions. This can...
Read more >SVG exports at a different size to W & H values in editor
When I export the SVG it has a size of 60x61. This is causing crunchy scaling ... The coordinates should be integers, with...
Read more >Export SVG without artboard size - Adobe Support Community
Use Artboards it's command to use any artboard as independent artwork. You can't use it for add or remove artboard size information. pawel....
Read more >Ensure the SVG stays the same size after saving or exporting ...
A demo showing how to ensure your SVG file stays the same size after saving or exporting it from Illustrator into Design Space....
Read more >Exporting as an SVG in Adobe Illustrator canvas size issues
Your problem is that your SVG is being saved with the Artboard, which is set to the default document size. Try using "Object...
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
I just want to say: this was my first return to open-source collaboration after a long period of burnout. Thank you for making it a pleasant one!
Thank you as well — and we nearly blew you off 😃. @lipis, maybe this would also fix the enormous logos in readme of this repo: https://github.com/pclainchard/excalidrawLib (scroll down).