blockly > blockRendering > Renderer > getConnectionPreviewMethod

blockRendering.Renderer.getConnectionPreviewMethod() method

v10 - This function is no longer respected. A custom IConnectionPreviewer may be able to fulfill the functionality.

Chooses a connection preview method based on the available connection, the current dragged connection, and the block being dragged.

Signature:

getConnectionPreviewMethod(closest: RenderedConnection, local: RenderedConnection, topBlock: BlockSvg): PreviewType;

Parameters

Parameter Type Description
closest RenderedConnection The available connection.
local RenderedConnection The connection currently being dragged.
topBlock BlockSvg The block currently being dragged.

Returns:

PreviewType

The preview type to display.