Skip to main content

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​

MethodDescription
getFirstChildReturns the first child of the given workspace comment.
getParentReturns the parent of the given workspace comment.
getNextSiblingReturns the next peer node of the given workspace comment.
getPreviousSiblingReturns the previous peer node of the given workspace comment.
getRowIdReturns the row ID of the given workspace comment.
isNavigableReturns whether or not the given workspace comment can be navigated to.
isApplicableReturns 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​

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

ParameterTypeDescription
currentRenderedWorkspaceCommentThe workspace comment to return the parent of.

Returns​

IFocusableNode | null

The parent workspace of the given comment.

Implementation of​

INavigationPolicy.getParent


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​

ParameterTypeDescription
currentRenderedWorkspaceCommentThe workspace comment to retrieve the row ID of.

Returns​

string

The row ID of the given workspace comment.

Implementation of​

INavigationPolicy.getRowId


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​

ParameterTypeDescription
currentRenderedWorkspaceCommentThe instance to check for navigability.

Returns​

boolean

True if the given workspace comment can be focused.

Implementation of​

INavigationPolicy.isNavigable


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​

ParameterTypeDescription
currentanyThe object to check if this policy applies to.

Returns​

current is RenderedWorkspaceComment

True if the object is an RenderedWorkspaceComment.

Implementation of​

INavigationPolicy.isApplicable