blockly > Field > positionTextElement_

Field.positionTextElement_() method

Position a field's text element after a size change. This handles both LTR and RTL positioning.

Signature:

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

Parameters

Parameter Type Description
xOffset number x offset to use when positioning the text element.
contentWidth number The content width.

Returns:

void