Stay organized with collections
Save and categorize content based on your preferences.
blockly > ISelectable
ISelectable interface
The interface for an object that is selectable.
Implementations are generally expected to use their implementations of onNodeFocus() and onNodeBlur() to call setSelected() with themselves and null, respectively, in order to ensure that selections are correctly updated and the selection change event is fired.
Signature:
export interface ISelectable extends IFocusableNode
Extends: IFocusableNode
Properties
Methods
Method |
Description |
select() |
Select this. Highlight it visually. |
unselect() |
Unselect this. Unhighlight it visually. |
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 2025-05-16 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 2025-05-16 UTC."],[[["The ISelectable interface defines objects that can be selected and unselected within a Blockly workspace."],["It includes properties for the object's ID and its associated workspace."],["Objects implementing this interface have methods for visual selection and deselection."]]],["The `ISelectable` interface defines objects that can be selected within a workspace. It mandates the presence of an `id` (string) and a `workspace` property of `Workspace` type. Key actions include `select()`, which visually highlights the object, and `unselect()`, which removes the visual highlight. These methods control the visual state of the selectable object within its designated workspace.\n"]]