Stay organized with collections
Save and categorize content based on your preferences.
blockly > IIcon > getWeight
IIcon.getWeight() method
Signature:
getWeight(): number;
Returns:
number
the "weight" of the icon, which determines the static order which icons should be rendered in. More positive numbers are rendered farther toward the end of the block.
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."],[[["The `getWeight()` method, part of the `IIcon` interface in Blockly, returns a numerical value representing the icon's weight."],["This weight dictates the rendering order of icons within a block, with higher values positioning icons further towards the block's end."]]],["The `getWeight()` method, part of the `IIcon` interface, returns a number representing the icon's weight. This weight dictates the rendering order of icons on a block. Higher weight values result in the icon being rendered towards the end of the block. The method's signature is `getWeight(): number;` and the returned value is a numeric type.\n"]]