Interface: IConnectionPreviewer
Defined in: packages/blockly/core/interfaces/i_connection_previewer.ts:14
Displays visual "previews" of where a block will be connected if it is dropped.
Methods index
| Method | Description |
|---|---|
| previewReplacement | Display a connection preview where the draggedCon connects to the staticCon, replacing the replacedBlock (currently connected to the staticCon). |
| previewConnection | Display a connection preview where the draggedCon connects to the staticCon, and no block is being relaced. |
| hidePreview | Hide any previews that are currently displayed. |
| dispose | Dispose of any references held by this connection previewer. |
Methods
previewReplacement()
previewReplacement(
draggedConn,
staticConn,
replacedBlock
): void;
Defined in: packages/blockly/core/interfaces/i_connection_previewer.ts:26
Display a connection preview where the draggedCon connects to the staticCon, replacing the replacedBlock (currently connected to the staticCon).
Parameters
| Parameter | Type | Description |
|---|---|---|
draggedConn | RenderedConnection | - |
staticConn | RenderedConnection | - |
replacedBlock | BlockSvg | The block currently connected to the staticCon that is being replaced. |
Returns
void
previewConnection()
previewConnection(draggedConn, staticConn): void;
Defined in: packages/blockly/core/interfaces/i_connection_previewer.ts:40
Display a connection preview where the draggedCon connects to the staticCon, and no block is being relaced.
Parameters
| Parameter | Type |
|---|---|
draggedConn | RenderedConnection |
staticConn | RenderedConnection |
Returns
void
hidePreview()
hidePreview(): void;
Defined in: packages/blockly/core/interfaces/i_connection_previewer.ts:46
Hide any previews that are currently displayed.
Returns
void
dispose()
dispose(): void;
Defined in: packages/blockly/core/interfaces/i_connection_previewer.ts:49
Dispose of any references held by this connection previewer.
Returns
void