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
| Method | Description |
|---|---|
| getFirstChild | Returns the first child of the given workspace. |
| getParent | Returns the parent of the given workspace. |
| getNextSibling | Returns the next sibling of the given workspace. |
| getPreviousSibling | Returns the previous sibling of the given workspace. |
| getRowId | Returns the row ID of the given workspace. |
| isNavigable | Returns whether or not the given workspace can be navigated to. |
| isApplicable | Returns 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
| Parameter | Type | Description |
|---|---|---|
current | WorkspaceSvg | The 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
| Parameter | Type | Description |
|---|---|---|
_current | WorkspaceSvg | The workspace to return the parent of. |
Returns
IFocusableNode | null
Null.
Implementation of
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
| Parameter | Type | Description |
|---|---|---|
_current | WorkspaceSvg | The 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
| Parameter | Type | Description |
|---|---|---|
_current | WorkspaceSvg | The 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
| Parameter | Type | Description |
|---|---|---|
current | WorkspaceSvg | The workspace to retrieve the row ID of. |
Returns
string
The row ID of the given workspace.
Implementation of
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
| Parameter | Type | Description |
|---|---|---|
current | WorkspaceSvg | The instance to check for navigability. |
Returns
boolean
True if the given workspace can be focused.
Implementation of
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
| Parameter | Type | Description |
|---|---|---|
current | any | The object to check if this policy applies to. |
Returns
current is WorkspaceSvg
True if the object is a WorkspaceSvg.