Class: WorkspaceCommentNavigationPolicy
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_comment_navigation_policy.ts:14
Set of rules controlling keyboard navigation from an RenderedWorkspaceComment.
Implements
Methods index
| Method | Description |
|---|---|
| getFirstChild | Returns the first child of the given workspace comment. |
| getParent | Returns the parent of the given workspace comment. |
| getNextSibling | Returns the next peer node of the given workspace comment. |
| getPreviousSibling | Returns the previous peer node of the given workspace comment. |
| getRowId | Returns the row ID of the given workspace comment. |
| isNavigable | Returns whether or not the given workspace comment can be navigated to. |
| isApplicable | Returns whether the given object can be navigated from by this policy. |
Constructors
Constructor
new WorkspaceCommentNavigationPolicy(): WorkspaceCommentNavigationPolicy;
Returns
WorkspaceCommentNavigationPolicy
Methods
getFirstChild()
getFirstChild(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_comment_navigation_policy.ts:21
Returns the first child of the given workspace comment.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedWorkspaceComment | The workspace comment to return the first child of. |
Returns
IFocusableNode | null
The first child button of the given comment.
Implementation of
INavigationPolicy.getFirstChild
getParent()
getParent(current): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_comment_navigation_policy.ts:31
Returns the parent of the given workspace comment.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedWorkspaceComment | The workspace comment to return the parent of. |
Returns
IFocusableNode | null
The parent workspace of the given comment.
Implementation of
getNextSibling()
getNextSibling(): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_comment_navigation_policy.ts:40
Returns the next peer node of the given workspace comment.
Returns
IFocusableNode | null
Null, as workspace comments do not have peers.
Implementation of
INavigationPolicy.getNextSibling
getPreviousSibling()
getPreviousSibling(): IFocusableNode | null;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_comment_navigation_policy.ts:49
Returns the previous peer node of the given workspace comment.
Returns
IFocusableNode | null
Null, as workspace comments do not have peers.
Implementation of
INavigationPolicy.getPreviousSibling
getRowId()
getRowId(current): string;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_comment_navigation_policy.ts:59
Returns the row ID of the given workspace comment.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedWorkspaceComment | The workspace comment to retrieve the row ID of. |
Returns
string
The row ID of the given workspace comment.
Implementation of
isNavigable()
isNavigable(current): boolean;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_comment_navigation_policy.ts:69
Returns whether or not the given workspace comment can be navigated to.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | RenderedWorkspaceComment | The instance to check for navigability. |
Returns
boolean
True if the given workspace comment can be focused.
Implementation of
isApplicable()
isApplicable(current): current is RenderedWorkspaceComment;
Defined in: packages/blockly/core/keyboard_nav/navigation_policies/workspace_comment_navigation_policy.ts:79
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 RenderedWorkspaceComment
True if the object is an RenderedWorkspaceComment.