Get coordinates of element relative to enclosing svg

Viewed 4845

I have an SVG with elements and groups of elements in it. I want to get the coordinates of an enclosed element, relative to the outer SVG. Currently I am using document.getElementById(elementid).getBBox().y, which always returns 0.

2 Answers
Related