Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add viewBox to generated svg #2

Open
jvzsec opened this issue Apr 27, 2021 · 0 comments
Open

Add viewBox to generated svg #2

jvzsec opened this issue Apr 27, 2021 · 0 comments

Comments

@jvzsec
Copy link

jvzsec commented Apr 27, 2021

Hi, I think it would be a nice idea to add the viewBox attribute to the generated svg file because the tag is missing viewBox, height and width attributes (at least for the World map, which I believe could be the most used). A use case example is when rendering a HTML file with WeasyPrint to PDF that contains a svg from this package it shows blank, but modifying _to_svg function to include an arbitrary viewBox = "0 0 x y" it shows properly.

Maybe you could detect the dimensions of the base svg by checking its properties and then set up a default viewBox and/or default height and width attributes.

Btw, congrats for the amazing repo, it works pretty cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant