blockly > utils > dom > getTextWidth
utils.dom.getTextWidth() 函式
取得文字元素的寬度,並在過程中快取文字。
Signature:
export declare function getTextWidth(textElement: SVGTextElement): number;
參數
參數 | 類型 | 說明 |
---|---|---|
textElement | SVGTextElement | SVG 的「text」元素。 |
傳回:
號碼
元素的寬度。