Function: callbackFactory()
function callbackFactory(block, state): () => BlockSvg;
Defined in: packages/blockly/core/contextmenu.ts:265
Create a callback function that creates and configures a block, then places the new block next to the original and returns it.
Parameters
| Parameter | Type | Description |
|---|---|---|
block | Block | Original block. |
state | | Element | State | XML or JSON object representation of the new block. |
Returns
Function that creates a block.
() => BlockSvg