Stay organized with collections
Save and categorize content based on your preferences.
blockly > InsertionMarkerPreviewer
InsertionMarkerPreviewer class
Signature:
export declare class InsertionMarkerPreviewer implements IConnectionPreviewer
Implements: IConnectionPreviewer
Constructors
Methods
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eInsertionMarkerPreviewer\u003c/code\u003e class in Blockly helps visualize where a block will be inserted during drag-and-drop interactions.\u003c/p\u003e\n"],["\u003cp\u003eIt implements the \u003ccode\u003eIConnectionPreviewer\u003c/code\u003e interface and provides methods for displaying and hiding previews.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eInsertionMarkerPreviewer\u003c/code\u003e handles two preview scenarios: inserting a block into an empty space and replacing an existing block.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use methods like \u003ccode\u003epreviewConnection\u003c/code\u003e and \u003ccode\u003epreviewReplacement\u003c/code\u003e to control the preview behavior.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003edispose\u003c/code\u003e method should be called to clean up references when the previewer is no longer needed.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [InsertionMarkerPreviewer](./blockly.insertionmarkerpreviewer_class.md)\n\nInsertionMarkerPreviewer class\n------------------------------\n\n**Signature:** \n\n export declare class InsertionMarkerPreviewer implements IConnectionPreviewer \n\n**Implements:** [IConnectionPreviewer](./blockly.iconnectionpreviewer_interface.md)\n\nConstructors\n------------\n\n| Constructor | Modifiers | Description |\n|--------------------------------------------------------------------------------------------------------|-----------|-------------------------------------------------------------------|\n| [(constructor)(draggedBlock)](./blockly.insertionmarkerpreviewer_class._constructor__1_constructor.md) | | Constructs a new instance of the `InsertionMarkerPreviewer` class |\n\nMethods\n-------\n\n| Method | Modifiers | Description |\n|---------------------------------------------------------------------------------------------------------------------------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [dispose()](./blockly.insertionmarkerpreviewer_class.dispose_1_method.md) | | Dispose of any references held by this connection previewer. |\n| [hidePreview()](./blockly.insertionmarkerpreviewer_class.hidepreview_1_method.md) | | Hide any previews that are currently displayed. |\n| [previewConnection(draggedConn, staticConn)](./blockly.insertionmarkerpreviewer_class.previewconnection_1_method.md) | | Display a connection preview where the draggedCon connects to the staticCon, and no block is being relaced. |\n| [previewReplacement(draggedConn, staticConn, replacedBlock)](./blockly.insertionmarkerpreviewer_class.previewreplacement_1_method.md) | | Display a connection preview where the draggedCon connects to the staticCon, replacing the replacedBlock (currently connected to the staticCon). |"]]