theia-ide / sprotty

A next-gen web-based graphics framework
Apache License 2.0
138 stars 23 forks source link

Improve SVG Export #213

Open uruuru opened 6 years ago

uruuru commented 6 years ago

The svg export doesn't seem to consider all graph elements when computing the viewBox's size (edges and labels for instance). See the following screenshot (the outer box represents the viewport as outlined by Inkscape).

image

Also, within Inkscape the text is not positioned properly. I'm not sure if this is Inkscape wrongly/incompletely implementing the svg standard, however, since the text is positioned properly when viewing the svg in Chrome and Firefox.

spoenemann commented 6 years ago

This might be caused by the fact that we don't use client-side layout yet in elkgraph-web. That is necessary in order to determine sizes of labels.