Skip to main content

blockly > navigateBlock

Returns the next navigable item relative to the provided block child.

Signature:

export declare function navigateBlock(block: BlockSvg, current: IFocusableNode, delta: number): IFocusableNode | null;

Parameters

Parameter

Type

Description

block

BlockSvg

The block whose children should be navigated.

current

IFocusableNode

The navigable block child item to navigate relative to.

delta

number

The difference in index to navigate; positive values navigate forward by n, while negative values navigate backwards by n.

Returns:

IFocusableNode | null

The navigable block child offset by delta relative to current.