Skip to main content

Home > blockly > InsertionMarkerPreviewer > previewReplacement

InsertionMarkerPreviewer.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
draggedConnRenderedConnectionThe connection on the block stack being dragged.
staticConnRenderedConnectionThe connection not being dragged that we are connecting to.
replacedBlockBlockSvgThe block currently connected to the staticCon that is being replaced.

Returns:

void