mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
refactor!: Add setSelectedItem() to IToolbox. (#8650)
This commit is contained in:
@@ -94,7 +94,7 @@ export interface IToolbox extends IRegistrable {
|
||||
setVisible(isVisible: boolean): void;
|
||||
|
||||
/**
|
||||
* Selects the toolbox item by it's position in the list of toolbox items.
|
||||
* Selects the toolbox item by its position in the list of toolbox items.
|
||||
*
|
||||
* @param position The position of the item to select.
|
||||
*/
|
||||
@@ -107,6 +107,14 @@ export interface IToolbox extends IRegistrable {
|
||||
*/
|
||||
getSelectedItem(): IToolboxItem | null;
|
||||
|
||||
/**
|
||||
* Sets the selected item.
|
||||
*
|
||||
* @param item The toolbox item to select, or null to remove the current
|
||||
* selection.
|
||||
*/
|
||||
setSelectedItem(item: IToolboxItem | null): void;
|
||||
|
||||
/** Disposes of this toolbox. */
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user