Given that there hasn't been any reaction to my RFE http://sourceforge.net/tracker/index.php?func=detail&atid=604309&aid... since more than three months I didn't even bother trying it out.
Tobi
After placing a few SVG images on XHTML docs, I would say that he is correct. For such things the size is less important than the viewBox="" setting.
I would suggest that for an interim solution, that when an SVG doc is written, the <svg> attribute be added:
viewBox="0 0 width height"
...where the width and height are the size of the page, but in SVG coordinates x 1.25 (1/0.8)
Then we can tell people that for the time being, they can just keep their drawing inside the rectangle, and that is what will be seen on a web page.
Here is the RFE: ========================= Summary: editable viewBox, SVGs without width="" or height="" Hi
Since your objective is to be an SVG editor it would be great to ditch the page-oriented editing canvas concept.
SVGs often have no width and height (scalable :) set on the outermost svg element (they default to 100%), but specify a viewBox.
Those SVGs should be handled, eg in the following way:
Display the SVG at something like 80% of the editing canvas window (the default 80% can be changed through zooming out or in), then provide a grey half-transparent grey layer (not an SVG object) overlaying the area that lies outside of the viewBox.
Inside the viewBox there is the graphic itself, and outside of this rectangle is visible the area that will be invisible in SVG viewers/players (thus it could be greyed out a bit). But it's part of the SVG, and should be fully editable (it becomes visible in SVG viewers/players when the user zooms out).
The viewBox rectangle's edges can be grabbed and moved; the viewBox is editable.
Tobi