How can i get the absolute position of an SVG element inside the SVG tag using javascript?
        Posted  
        
            by Morten
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Morten
        
        
        
        Published on 2010-05-02T16:41:25Z
        Indexed on 
            2010/05/02
            16:47 UTC
        
        
        Read the original article
        Hit count: 417
        
Hi!
I am trying to return the absolute position of an element in a SVG.
I have tried using basic javascript functions to return the relative position but I only have access to the contentDocument since the SVG is embeded using an OBJECT tag.
Because of this I cannot recurse thru the elements to find the position of the element position...
Is there any native SVG functions to get the position of an element relative to the SVG element (X=0, Y=0)?
Thank you, Morten!
© Stack Overflow or respective owner