blockly > utils > svgMath > getRelativeXY
utils.svgMath.getRelativeXY() function
Return the coordinates of the top-left corner of this element relative to its parent. Only for SVG elements and children (e.g. rect, g, path).
Signature:
export declare function getRelativeXY(element: Element): Coordinate;
Parameters
Parameter | Type | Description |
---|---|---|
element | Element | SVG element to find the coordinates of. |
Returns:
Object with .x and .y properties.