Hi André!

I wouldn't use units within the viewBox attribute, I would only use them on the width and height attribute.

So, if your original viewBox is like this: "0 0 1000 1000" and you later set it to "0 0 100 100" your graphics should zoom in (10% in width and height of the original).

If this doesn't work, maybe your svgElement reference is wrong?

To check that you'll have to provide a full example.

Andreas

André Rüdiger wrote:

Hi Mike!

Thanks for your reply. That was just a typo. I wanted to demonstrate what
I'm doing which actually is:

   svgElement.setAttributeNS(null, "viewBox", "0px 0px " + width + " " +
height);

width and height were defined above.

This results in something like

   <svg [...] viewbox="0px 0px 50px 50px">

which doesn't scale the svg.

Does anybody have a solution for svg scaling?

Thanks a lot,
André


--
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: [EMAIL PROTECTED]
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to