Skip to main content

Class: BubbleNavigationPolicy

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/bubble_navigation_policy.ts:17

Set of rules controlling keyboard navigation from a Bubble.

Implements​

Methods index​

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

Constructors​

Constructor​

new BubbleNavigationPolicy(): BubbleNavigationPolicy;

Returns​

BubbleNavigationPolicy

Methods​

getFirstChild()​

getFirstChild(_current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/bubble_navigation_policy.ts:24

Returns the first child of the given bubble.

Parameters​

ParameterTypeDescription
_currentBubbleThe bubble to return the first child of.

Returns​

IFocusableNode | null

Null.

Implementation of​

INavigationPolicy.getFirstChild


getParent()​

getParent(current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/bubble_navigation_policy.ts:34

Returns the parent of the given bubble.

Parameters​

ParameterTypeDescription
currentBubbleThe bubble to return the parent of.

Returns​

IFocusableNode | null

The parent block of the given bubble.

Implementation of​

INavigationPolicy.getParent


getNextSibling()​

getNextSibling(current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/bubble_navigation_policy.ts:44

Returns the next peer node of the given bubble.

Parameters​

ParameterTypeDescription
currentBubbleThe bubble to find the following element of.

Returns​

IFocusableNode | null

The next navigable item on the bubble's icon's parent block.

Implementation of​

INavigationPolicy.getNextSibling


getPreviousSibling()​

getPreviousSibling(current): IFocusableNode | null;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/bubble_navigation_policy.ts:58

Returns the previous peer node of the given bubble.

Parameters​

ParameterTypeDescription
currentBubbleThe bubble to find the preceding element of.

Returns​

IFocusableNode | null

The previous navigable item on the bubble's icon's parent block.

Implementation of​

INavigationPolicy.getPreviousSibling


getRowId()​

getRowId(current): string;

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

Returns the row ID of the given bubble.

Parameters​

ParameterTypeDescription
currentBubbleThe bubble to retrieve the row ID of.

Returns​

string

The row ID of the given bubble.

Implementation of​

INavigationPolicy.getRowId


isNavigable()​

isNavigable(current): boolean;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/bubble_navigation_policy.ts:87

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

Parameters​

ParameterTypeDescription
currentBubbleThe instance to check for navigability.

Returns​

boolean

True if the given bubble can be focused.

Implementation of​

INavigationPolicy.isNavigable


isApplicable()​

isApplicable(current): current is Bubble;

Defined in: packages/blockly/core/keyboard_nav/navigation_policies/bubble_navigation_policy.ts:97

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 Bubble

True if the object is an Bubble.

Implementation of​

INavigationPolicy.isApplicable