Stay organized with collections
Save and categorize content based on your preferences.
blockly > IIcon > isShownWhenCollapsed
IIcon.isShownWhenCollapsed() method
Signature:
isShownWhenCollapsed(): boolean;
Returns:
boolean
Whether this icon is shown when the block is collapsed. Used to allow renderers to account for padding.
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 `isShownWhenCollapsed()` method, part of the `IIcon` interface in Blockly, determines if an icon is displayed when its associated block is collapsed."],["This method returns a boolean value indicating whether the icon is visible in the collapsed state, which helps renderers manage padding and layout."]]],["The `isShownWhenCollapsed()` method, part of the `IIcon` interface, determines if an icon should be visible when its associated block is collapsed. It takes no arguments and returns a boolean value. This boolean indicates the icon's visibility status in a collapsed state, helping renderers manage padding effectively. The method's core purpose is to control icon display during block collapse.\n"]]