Skip to main content

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​

MethodDescription
getFirstChildReturns the first child of a connection.
getParentReturns the parent of the given connection.
getNextSiblingReturns the next element following the given connection.
getPreviousSiblingReturns the element preceding the given connection.
getRowIdReturns the row ID of the given connection.
isNavigableReturns whether or not the given connection can be navigated to.
isApplicableReturns 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​

ParameterTypeDescription
currentRenderedConnectionThe connection to return the parent of.

Returns​

IFocusableNode | null

The given connection's parent block.

Implementation of​

INavigationPolicy.getParent


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​

ParameterTypeDescription
currentRenderedConnectionThe 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​

ParameterTypeDescription
currentRenderedConnectionThe 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​

ParameterTypeDescription
currentRenderedConnectionThe connection to retrieve the row ID of.

Returns​

string

The row ID of the given connection.

Implementation of​

INavigationPolicy.getRowId


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​

ParameterTypeDescription
currentRenderedConnectionThe instance to check for navigability.

Returns​

boolean

True if the given connection can be focused.

Implementation of​

INavigationPolicy.isNavigable


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​

ParameterTypeDescription
currentanyThe object to check if this policy applies to.

Returns​

current is RenderedConnection

True if the object is a RenderedConnection.

Implementation of​

INavigationPolicy.isApplicable