-
Notifications
You must be signed in to change notification settings - Fork 521
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
width and height specification in svg-file #540
Comments
i think this is what you're suggesting: #16. But I'm not sure. Could you explain more if it's different? |
watch-mode; my suggestion; |
So when you open the .svg, Edge isn't showing you the full svg and it's clipped until you zoom out/scroll? I guess we could add a script in the .svg to take care of this. |
yes. Edge/Chrome for Windows please add the script. I hope so. |
@berniexie #560 (comment) doesn't fix this. The standalone svg needs to resize too and needs a simlar script embedded. |
@nhooyr but how would we know what to resize it to with no browser? Isn't the whole point of svg that it looks good at any size |
@berniexie So you can embed a js script directly into the svg so that when the svg is opened, the js runs. The earliest version of d2 --watch used to use no html and just serve an svg with the js embedded directly. |
i am drawing the diagram when I execute watch-mode. |
Yea I guess we only want to zoom on the initial load and not for every update thereafter. |
i can't use v0.1.4 when i'm drawing the big diagrams because of this issue. |
I would suggest using v0.1.3 or building from master as @berniexie has fixed it. And you can wait until the next release of course. |
we'll cut 0.1.5 with this fix in the next few days |
The default output of d2.exe is specified as width and height.
If the svg file output by d2.exe is too wide or long, I would like to immediately display the entire figure in Edge (Chromium).
Is there such an option?
Contents of *.svg
<?xml version="1.0" encoding="utf-8"?>
<svg
style="background: white;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="
100%
" height="100%
" viewBox="-10 -10 1048 5796"><style type="text/css"><![CDATA[
.shape {
shape-rendering: geometricPrecision;
stroke-linejoin: round;
}
.connection {
<snip>
The text was updated successfully, but these errors were encountered: