blockly > utils > svgMath > getInjectionDivXY
utils.svgMath.getInjectionDivXY() function
Return the coordinates of the top-left corner of this element relative to the div Blockly was injected into.
Signature:
export declare function getInjectionDivXY(element: Element): Coordinate;
Parameters
Parameter | Type | Description |
---|---|---|
element | Element | SVG element to find the coordinates of. If this is not a child of the div Blockly was injected into, the behaviour is undefined. |
Returns:
Object with .x and .y properties.