(elem)
| 13 | // Based off of this: |
| 14 | // https://stackoverflow.com/questions/26049488/how-to-get-absolute-coordinates-of-object-inside-a-g-group |
| 15 | function getSVGElemScreenBBox(elem) { |
| 16 | var svg = SVGTools.findParentSVG(elem); |
| 17 | var rect = svg.createSVGRect(); |
| 18 | var pt = svg.createSVGPoint(); |
| 19 | var ctm = elem.getScreenCTM(); |
| 20 | var bbox = elem.getBBox(); |
| 21 | pt.x = bbox.x; |
| 22 | pt.y = bbox.y; |
| 23 | rect.width = bbox.width; |
| 24 | rect.height = bbox.height; |
| 25 | pt = pt.matrixTransform(ctm); |
| 26 | rect.x = pt.x; |
| 27 | rect.y = pt.y; |
| 28 | return rect; |
| 29 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…