Skip to main content

Class: WorkspaceNavigationPolicy

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_navigation_policy.ts:14

Set of rules controlling keyboard navigation from a workspace.

Implements​

Methods index​

MethodDescription
getFirstChildReturns the first child of the given workspace.
getParentReturns the parent of the given workspace.
getNextSiblingReturns the next sibling of the given workspace.
getPreviousSiblingReturns the previous sibling of the given workspace.
getRowIdReturns the row ID of the given workspace.
isNavigableReturns whether or not the given workspace can be navigated to.
isApplicableReturns whether the given object can be navigated from by this policy.

Constructors​

Constructor​

new WorkspaceNavigationPolicy(): WorkspaceNavigationPolicy;

Returns​

WorkspaceNavigationPolicy

Methods​

getFirstChild()​

getFirstChild(current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_navigation_policy.ts:21

Returns the first child of the given workspace.

Parameters​

ParameterTypeDescription
currentWorkspaceSvgThe workspace to return the first child of.

Returns​

IFocusableNode | null

The top block of the first block stack, if any.

Implementation of​

INavigationPolicy.getFirstChild


getParent()​

getParent(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_navigation_policy.ts:32

Returns the parent of the given workspace.

Parameters​

ParameterTypeDescription
_currentWorkspaceSvgThe workspace to return the parent of.

Returns​

IFocusableNode | null

Null.

Implementation of​

INavigationPolicy.getParent


getNextSibling()​

getNextSibling(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_navigation_policy.ts:42

Returns the next sibling of the given workspace.

Parameters​

ParameterTypeDescription
_currentWorkspaceSvgThe workspace to return the next sibling of.

Returns​

IFocusableNode | null

Null.

Implementation of​

INavigationPolicy.getNextSibling


getPreviousSibling()​

getPreviousSibling(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_navigation_policy.ts:52

Returns the previous sibling of the given workspace.

Parameters​

ParameterTypeDescription
_currentWorkspaceSvgThe workspace to return the previous sibling of.

Returns​

IFocusableNode | null

Null.

Implementation of​

INavigationPolicy.getPreviousSibling


getRowId()​

getRowId(current): string;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_navigation_policy.ts:62

Returns the row ID of the given workspace.

Parameters​

ParameterTypeDescription
currentWorkspaceSvgThe workspace to retrieve the row ID of.

Returns​

string

The row ID of the given workspace.

Implementation of​

INavigationPolicy.getRowId


isNavigable()​

isNavigable(current): boolean;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_navigation_policy.ts:72

Returns whether or not the given workspace can be navigated to.

Parameters​

ParameterTypeDescription
currentWorkspaceSvgThe instance to check for navigability.

Returns​

boolean

True if the given workspace can be focused.

Implementation of​

INavigationPolicy.isNavigable


isApplicable()​

isApplicable(current): current is WorkspaceSvg;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_navigation_policy.ts:82

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 WorkspaceSvg

True if the object is a WorkspaceSvg.

Implementation of​

INavigationPolicy.isApplicable