Class: IconNavigationPolicy
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/icon_navigation_policy.ts:16
Set of rules controlling keyboard navigation from an icon.
Implements
Methods index
| Method | Description |
|---|---|
| getFirstChild | Returns the first child of the given icon. |
| getParent | Returns the parent of the given icon. |
| getNextSibling | Returns the next peer node of the given icon. |
| getPreviousSibling | Returns the previous peer node of the given icon. |
| getRowId | Returns the row ID of the given icon. |
| isNavigable | Returns whether or not the given icon can be navigated to. |
| isApplicable | Returns whether the given object can be navigated from by this policy. |
Constructors
Constructor
new IconNavigationPolicy(): IconNavigationPolicy;
Returns
IconNavigationPolicy
Methods
getFirstChild()
getFirstChild(_current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/icon_navigation_policy.ts:23
Returns the first child of the given icon.
Parameters
| Parameter | Type | Description |
|---|---|---|
_current | Icon | The icon to return the first child of. |
Returns
IFocusableNode | null
Null.
Implementation of
INavigationPolicy.getFirstChild
getParent()
getParent(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/icon_navigation_policy.ts:33
Returns the parent of the given icon.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | Icon | The icon to return the parent of. |
Returns
IFocusableNode | null
The source block of the given icon.
Implementation of
getNextSibling()
getNextSibling(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/icon_navigation_policy.ts:43
Returns the next peer node of the given icon.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | Icon | The icon to find the following element of. |
Returns
IFocusableNode | null
The next icon, field or input following this icon, if any.
Implementation of
INavigationPolicy.getNextSibling
getPreviousSibling()
getPreviousSibling(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/icon_navigation_policy.ts:53
Returns the previous peer node of the given icon.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | Icon | The icon to find the preceding element of. |
Returns
IFocusableNode | null
The icon's previous icon, if any.
Implementation of
INavigationPolicy.getPreviousSibling
getRowId()
getRowId(current): string;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/icon_navigation_policy.ts:63
Returns the row ID of the given icon.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | Icon | The icon to retrieve the row ID of. |
Returns
string
The row ID of the given icon.
Implementation of
isNavigable()
isNavigable(current): boolean;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/icon_navigation_policy.ts:73
Returns whether or not the given icon can be navigated to.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | Icon | The instance to check for navigability. |
Returns
boolean
True if the given icon can be focused.
Implementation of
isApplicable()
isApplicable(current): current is Icon;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/icon_navigation_policy.ts:83
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 Icon
True if the object is an Icon.