Skip to main content

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

Parameter

Type

Description

draggedConn

RenderedConnection

The connection on the block stack being dragged.

staticConn

RenderedConnection

The connection not being dragged that we are connecting to.

replacedBlock

BlockSvg

The block currently connected to the staticCon that is being replaced.

Returns:

void