Stay organized with collections
Save and categorize content based on your preferences.
blockly > blockRendering > IPathObject > updateSelected
blockRendering.IPathObject.updateSelected() method
Add or remove styling showing that a block is selected.
Signature:
updateSelected(enabled: boolean): void;
Parameters
Parameter |
Type |
Description |
enabled |
boolean |
|
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.
[[["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 `updateSelected` method is used to visually indicate whether a block is selected or not by applying or removing styling."],["It takes a single boolean parameter, `enabled`, which determines if the selected styling should be applied (`true`) or removed (`false`)."],["This method is part of the `IPathObject` interface within the `blockRendering` namespace in Blockly."]]],["The `updateSelected` method, part of the `IPathObject` interface, modifies a block's styling to indicate whether it is selected or not. It takes a single boolean parameter, `enabled`. If `enabled` is true, styling to show selection is added; if false, selection styling is removed. The method returns nothing. This is used to update the visual state of blocks within a block rendering system.\n"]]