nl_tokens: Note on viewbox / width This methods only work when the pixels match the svg units . when the viewbox is changed or width is set they won t return the correct results Returns the global coordinates of a position given for a specific coordinate system
pl_tokens: function toGlobalCoordinates ( svgdoc : any , elem : any , x : number , y : number ) { var offset = svgdoc . getBoundingClientRect ( ) ; var matrix = elem . getScreenCTM ( ) ; return { x : matrix . a * x + matrix . c * y + matrix . e - offset . left , y : matrix . b * x + matrix . d * y + matrix . f - <mask> . top } ; }