blockly > utils > svgMath > getRelativeXY
utils.svgMath.getRelativeXY() 函式
傳回這個元素的左上角座標 (相對於父項)。僅適用於 SVG 元素和子項 (例如矩形、g、path)。
Signature:
export declare function getRelativeXY(element: Element): Coordinate;
參數
參數 | 類型 | 說明 |
---|---|---|
元素 | 元素 | 如要找出座標,請檢視 SVG 元素。 |
傳回:
含有 .x 和 .y 屬性的物件。