Stay organized with collections
Save and categorize content based on your preferences.
blockly > IDragTarget > onDrop
IDragTarget.onDrop() method
Handles when a block or bubble is dropped on this component. Should not handle delete here.
Signature:
onDrop(dragElement: IDraggable): void;
Parameters
Parameter |
Type |
Description |
dragElement |
IDraggable |
The block or bubble currently being dragged. |
Returns:
void
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\u003eonDrop()\u003c/code\u003e method is part of the \u003ccode\u003eIDragTarget\u003c/code\u003e interface and is invoked when a draggable element is dropped onto the target.\u003c/p\u003e\n"],["\u003cp\u003eIt receives the \u003ccode\u003eIDraggable\u003c/code\u003e element as a parameter to identify the dropped block or bubble.\u003c/p\u003e\n"],["\u003cp\u003eThis method is responsible for handling the drop action but should not manage delete operations within its scope.\u003c/p\u003e\n"]]],["The `onDrop` method, part of the `IDragTarget` interface, manages the event when a draggable element (block or bubble) is dropped onto a specific component. This method receives the `dragElement`, which represents the currently dragged item, as its input. The action's primary responsibility is to handle the drop event, while specifically avoiding any deletion processes. The method does not return any value (void).\n"],null,["[blockly](./blockly.md) \\\u003e [IDragTarget](./blockly.idragtarget_interface.md) \\\u003e [onDrop](./blockly.idragtarget_interface.ondrop_1_methodsignature.md)\n\nIDragTarget.onDrop() method\n\nHandles when a block or bubble is dropped on this component. Should not handle delete here.\n\n**Signature:** \n\n onDrop(dragElement: IDraggable): void;\n\nParameters\n\n| Parameter | Type | Description |\n|-------------|-------------------------------------------------|----------------------------------------------|\n| dragElement | [IDraggable](./blockly.idraggable_interface.md) | The block or bubble currently being dragged. |\n\n**Returns:**\n\nvoid"]]