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

Parameter Type Description
draggedConn RenderedConnection
staticConn RenderedConnection
replacedBlock BlockSvg The block currently connected to the staticCon that is being replaced.

Returns:

void