blockly > 字段 > positionTextElement_

Field.positionTextElement_() 方法

在大小发生变化后定位字段的文本元素。这既可处理 LTR 定位,也可处理 RTL 定位。

Signature:

protected positionTextElement_(xOffset: number, contentWidth: number): void;

参数

参数 类型 说明
xOffset number 定位文本元素时使用的 x 偏移量。
contentWidth number 内容宽度。

返回

void