Skip to main content

Home > blockly > IConnectionPreviewer > previewReplacement

IConnectionPreviewer.previewReplacement() method

Display a connection preview where the draggedCon connects to the staticCon, replacing the replacedBlock (currently connected to the staticCon).

Signature:

previewReplacement(draggedConn: RenderedConnection, staticConn: RenderedConnection, replacedBlock: BlockSvg): void;

Parameters

ParameterTypeDescription
draggedConnRenderedConnection
staticConnRenderedConnection
replacedBlockBlockSvgThe block currently connected to the staticCon that is being replaced.

Returns:

void