i have a web page with a svg which has another svg element in it. Thing is that i need to get matrix information via getScreenCTM() method (for nested svg) and firefox is returning different results than other browsers (IE, Chrome, Opera). Dont you know why is that?
Here i made a simple example: https://jsfiddle.net/6wz6nybv/6/
<svg id="svgwrapper" xmlns="http://www.w3.org/2000/svg">
<svg id="svgnested" width="1480mm" height="297mm" viewBox="0 0 149000 29700" xmlns="http://www.w3.org/2000/svg">
viewBox is a transform that applies to the children of an element and not the element itself.
If Firefox worked like the other buggy browsers then you'd find it hard to position the inner
<svg> element within the root
<svg> element because its getScreenCTM would be different to the getScreenCTM of a path or rect say.
What you're almost certainly looking for however is the CTM of some element that's within the inner
<svg> element. You'll find that the values are cross-browser consistent in that case.