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

Flag to enable/disable wrapping in another SVG #1564

Closed
vfosnar opened this issue Aug 24, 2023 · 2 comments
Closed

Flag to enable/disable wrapping in another SVG #1564

vfosnar opened this issue Aug 24, 2023 · 2 comments

Comments

@vfosnar
Copy link
Contributor

vfosnar commented Aug 24, 2023

Gecko (not sure abt. chromium) requires both width and height attributes on the root SVG element to render it to a canvas.

These are missing by default in the wrapping container to allow scaling AFAIK.

Add a flag that removes the wrapping SVG container to allow external programs to render the SVG to a canvas.

@cyborg-ts cyborg-ts added this to D2 Aug 24, 2023
@gavin-ts
Copy link
Contributor

I think this may be fixed by running d2 with --scale=1 which should include the width and height on the outer SVG

@vfosnar
Copy link
Contributor Author

vfosnar commented Aug 26, 2023

Thank you<3 that works! Dunno why I missed the flag.

@vfosnar vfosnar closed this as completed Aug 26, 2023
@github-project-automation github-project-automation bot moved this to Done in D2 Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants