Stay organized with collections
Save and categorize content based on your preferences.
blockly > icons > WarningIcon > WEIGHT
icons.WarningIcon.WEIGHT property
The weight this icon has relative to other icons. Icons with more positive weight values are rendered farther toward the end of the block.
Signature:
static readonly WEIGHT = 2;
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."],[[["\u003cp\u003e\u003ccode\u003eicons.WarningIcon.WEIGHT\u003c/code\u003e is a static, read-only property that determines the rendering priority of the warning icon relative to other icons on a block.\u003c/p\u003e\n"],["\u003cp\u003eThe property is assigned a value of 2, indicating that the warning icon has a relatively high weight and will be rendered towards the end of the block, after icons with lower weights.\u003c/p\u003e\n"]]],["The `WarningIcon.WEIGHT` property, a static, read-only value, determines the rendering order of icons. It is set to `2`, indicating the relative weight of the warning icon. Icons with higher weight values are rendered towards the end of the block. This property's purpose is to control the visual placement of the warning icon compared to other block icons.\n"],null,["[blockly](./blockly.md) \\\u003e [icons](./blockly.icons_namespace.md) \\\u003e [WarningIcon](./blockly.icons_namespace.warningicon_class.md) \\\u003e [WEIGHT](./blockly.icons_namespace.warningicon_class.weight_property.md)\n\nicons.WarningIcon.WEIGHT property\n---------------------------------\n\nThe weight this icon has relative to other icons. Icons with more positive weight values are rendered farther toward the end of the block.\n\n**Signature:** \n\n static readonly WEIGHT = 2;"]]