Class: ConnectionNavigationPolicy
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/connection_navigation_policy.ts:17
Set of rules controlling keyboard navigation from a connection.
Implements
Methods index
| Method | Description |
|---|---|
| getFirstChild | Returns the first child of a connection. |
| getParent | Returns the parent of the given connection. |
| getNextSibling | Returns the next element following the given connection. |
| getPreviousSibling | Returns the element preceding the given connection. |
| getRowId | Returns the row ID of the given connection. |
| isNavigable | Returns whether or not the given connection can be navigated to. |
| isApplicable | Returns whether the given object can be navigated from by this policy. |
Constructors
Constructor
new ConnectionNavigationPolicy(): ConnectionNavigationPolicy;
Returns
ConnectionNavigationPolicy
Methods
getFirstChild()
getFirstChild(): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/connection_navigation_policy.ts:23
Returns the first child of a connection.
Returns
IFocusableNode | null
Null, as connections do not have children.
Implementation of
INavigationPolicy.getFirstChild
getParent()
getParent(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/connection_navigation_policy.ts:33
Returns the parent of the given connection.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedConnection | The connection to return the parent of. |
Returns
IFocusableNode | null
The given connection's parent block.
Implementation of
getNextSibling()
getNextSibling(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/connection_navigation_policy.ts:43
Returns the next element following the given connection.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedConnection | The connection to navigate from. |
Returns
IFocusableNode | null
The field, input connection or block following this connection.
Implementation of
INavigationPolicy.getNextSibling
getPreviousSibling()
getPreviousSibling(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/connection_navigation_policy.ts:75
Returns the element preceding the given connection.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedConnection | The connection to navigate from. |
Returns
IFocusableNode | null
The field, input connection or block preceding this connection.
Implementation of
INavigationPolicy.getPreviousSibling
getRowId()
getRowId(current): string;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/connection_navigation_policy.ts:100
Returns the row ID of the given connection.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedConnection | The connection to retrieve the row ID of. |
Returns
string
The row ID of the given connection.
Implementation of
isNavigable()
isNavigable(current): boolean;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/connection_navigation_policy.ts:119
Returns whether or not the given connection can be navigated to.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedConnection | The instance to check for navigability. |
Returns
boolean
True if the given connection can be focused.
Implementation of
isApplicable()
isApplicable(current): current is RenderedConnection;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/connection_navigation_policy.ts:146
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 RenderedConnection
True if the object is a RenderedConnection.