blockly > BlockFlyoutInflater > createBlock
BlockFlyoutInflater.createBlock() method
Creates a block on the given workspace.
Signature:
createBlock(blockDefinition: BlockInfo, workspace: WorkspaceSvg): BlockSvg;
Parameters
Parameter | Type | Description |
|---|---|---|
blockDefinition | A JSON representation of the block to create. | |
workspace | The workspace to create the block on. |
Returns:
The newly created block.