blockly > Field > updateSize_
Field.updateSize_() method
Updates the size of the field based on the text.
Signature:
protected updateSize_(margin?: number): void;
Parameters
Parameter |
Type |
Description |
margin |
number |
(Optional) margin to use when positioning the text element. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `updateSize_()` method dynamically adjusts the size of a Blockly field to fit its text content."],["It's a protected method, primarily used internally by the Blockly library."],["An optional margin parameter allows for customizing the spacing around the text within the field."]]],[]]