icons.Icon class
The abstract icon class. Icons are visual elements that live in the top-start corner of the block. Usually they provide more "meta" information about a block (such as warnings or comments) as opposed to fields, which provide "actual" information, related to how a block functions.
Signature:
export declare abstract class Icon implements IIcon, IContextMenu
Implements: IIcon, IContextMenu
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| The position of this icon relative to its blocks top-start, in workspace units. | ||
| |||
| SVGGElement | null | The root svg element visually representing this icon. | |
| The tooltip for this icon. | ||
| The position of this icon in workspace coordinates. |
Methods
Method | Modifiers | Description |
|---|---|---|
See IFocusableNode.canBeFocused. | ||
See IFocusableNode.getFocusableElement. | ||
See IFocusableNode.getFocusableTree. | ||
Returns the block that this icon is attached to. | ||
Returns the tooltip for this icon. | ||
Check whether the icon should be clickable while the block is in a flyout. The default is that icons are clickable in all flyouts (auto-closing or not). Subclasses may override this function to change this behavior. | ||
See IFocusableNode.onNodeBlur. | ||
See IFocusableNode.onNodeFocus. | ||
Sets the tooltip for this icon to the given value. Null to show the tooltip of the block. | ||