Skip to main content

blockly > InsertionMarkerPreviewer

InsertionMarkerPreviewer class

Signature:

export declare class InsertionMarkerPreviewer implements IConnectionPreviewer

Implements: IConnectionPreviewer

Constructors

Constructor

Modifiers

Description

(constructor)(draggedBlock)

Constructs a new instance of the InsertionMarkerPreviewer class

Properties

Property

Modifiers

Type

Description

useFastInsertionMarkers

static

boolean

If set to true, uses a faster method for rendering insertion markers which will become the default in v14. This rendering method is enabled for the built-in Thrasos, Geras and Zelos renderers regardless of the state of this flag. Custom renderers will use the old rendering behavior unless this is set to true. This field will be removed in v14.

Methods

Method

Modifiers

Description

dispose()

Dispose of any references held by this connection previewer.

hidePreview()

Hide any previews that are currently displayed.

previewConnection(draggedConn, staticConn)

Display a connection preview where the draggedCon connects to the staticCon, and no block is being replaced.

previewReplacement(draggedConn, staticConn, replacedBlock)

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

serializeBlockToInsertionMarker(block)

protected

Transforms the given block into a JSON representation used to construct an insertion marker.