Hi there!
I have one svg image and I want to center a circle on the center of the svg
image
i´m doing like this:

no = document.embeds['SVGimage'].getSVGDocument().rootElement;
x = parseInt(no.getElementById("MyCircle").getAtribute("x"));
y = parseInt(no.getElementById("MyCircle").getAtribute("y"));
scale = no.currentScale;
nox = no.currentTranslate.x;
noy = no.currentTranslate.y;
no.currentTranslate.x = (document.body.clientWidth)/2 - Math.round(x)*scale
- nox*(scale-1);
no.currentTranslate.y = (document.body.clientHeight)/2 - Math.round(y)*scale
- noy*(scale-1);

but it centers wrongly as I use Zoom In/Out (using ASV)

I wonder if anyone could help me through this

Thanks in advance


[Non-text portions of this message have been removed]



-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to