Class: ToolboxItemNavigationPolicy
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.ts:18
Set of rules controlling keyboard navigation from a toolbox item.
Implements
Methods index
| Method | Description |
|---|---|
| getFirstChild | Returns the first child of the given toolbox item. |
| getParent | Returns the parent of the given toolbox item. |
| getNextSibling | Returns the next sibling of the given toolbox item. |
| getPreviousSibling | Returns the previous sibling of the given toolbox item. |
| getRowId | Returns the row ID of the given toolbox item. |
| isNavigable | Returns whether or not the given toolbox item can be navigated to. |
| isApplicable | Returns whether the given object can be navigated from by this policy. |
Constructors
Constructor
new ToolboxItemNavigationPolicy(): ToolboxItemNavigationPolicy;
Returns
ToolboxItemNavigationPolicy
Methods
getFirstChild()
getFirstChild(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.ts:25
Returns the first child of the given toolbox item.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | IToolboxItem | The toolbox item to return the first child of. |
Returns
IFocusableNode | null
The child item of a collapsible toolbox item, otherwise null.
Implementation of
INavigationPolicy.getFirstChild
getParent()
getParent(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.ts:39
Returns the parent of the given toolbox item.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | IToolboxItem | The toolbox item to return the parent of. |
Returns
IFocusableNode | null
The parent toolbox item of the given toolbox item, if any.
Implementation of
getNextSibling()
getNextSibling(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.ts:49
Returns the next sibling of the given toolbox item.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | IToolboxItem | The toolbox item to return the next sibling of. |
Returns
IFocusableNode | null
The next toolbox item, or null.
Implementation of
INavigationPolicy.getNextSibling
getPreviousSibling()
getPreviousSibling(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.ts:61
Returns the previous sibling of the given toolbox item.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | IToolboxItem | The toolbox item to return the previous sibling of. |
Returns
IFocusableNode | null
The previous toolbox item, or null.
Implementation of
INavigationPolicy.getPreviousSibling
getRowId()
getRowId(current): string;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.ts:73
Returns the row ID of the given toolbox item.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | IToolboxItem | The toolbox item to retrieve the row ID of. |
Returns
string
The row ID of the given toolbox item.
Implementation of
isNavigable()
isNavigable(current): boolean;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.ts:83
Returns whether or not the given toolbox item can be navigated to.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | IToolboxItem | The instance to check for navigability. |
Returns
boolean
True if the given toolbox item can be focused.
Implementation of
isApplicable()
isApplicable(current): current is IToolboxItem;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/toolbox_item_navigation_policy.ts:100
Returns whether the given object can be navigated from by this policy.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | any | The object to check if this policy applies to. |
Returns
current is IToolboxItem
True if the object is an IToolboxItem.