Stay organized with collections
Save and categorize content based on your preferences.
blockly > Field > getSize
Field.getSize() method
Returns the height and width of the field.
This should *in general* be the only place render_ gets called from.
Signature:
getSize(): Size;
Returns:
Size
Height and width.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["`Field.getSize()` returns the dimensions (height and width) of a Blockly field as a `Size` object."],["This method is typically the primary location where the field's rendering logic (`render_`) is executed, determining its visual size."]]],["The `Field.getSize()` method calculates and returns the dimensions of a field. Specifically, it outputs the height and width as a `Size` object. This method is typically the primary source for invoking rendering operations. It has a simple signature, `getSize(): Size;`, and is vital for determining the space occupied by a field.\n"]]