blockly > WorkspaceSvg > getAllBlocks

WorkspaceSvg.getAllBlocks() method

Find all blocks in workspace. Blocks are optionally sorted by position; top to bottom (with slight LTR or RTL bias).

Signature:

getAllBlocks(ordered?: boolean): BlockSvg[];

Parameters

Parameter Type Description
ordered boolean (Optional) Sort the list if true.

Returns:

BlockSvg[]

Array of blocks.