Stay organized with collections
Save and categorize content based on your preferences.
blockly > IDeleteArea
IDeleteArea interface
Interface for a component that can delete a block or bubble that is dropped on top of it.
Signature:
export interface IDeleteArea extends IDragTarget
Extends: IDragTarget
Methods
Method |
Description |
wouldDelete(element) |
Returns whether the provided block or bubble would be deleted if dropped on this area. This method should check if the element is deletable and is always called before onDragEnter/onDragOver/onDragExit. |
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 IDeleteArea interface defines components that can delete blocks or bubbles dropped onto them.\u003c/p\u003e\n"],["\u003cp\u003eIt extends the IDragTarget interface, inheriting drag-and-drop functionalities.\u003c/p\u003e\n"],["\u003cp\u003eThe primary method, \u003ccode\u003ewouldDelete\u003c/code\u003e, checks if a given element would be deleted if dropped on the area, considering its deletability.\u003c/p\u003e\n"]]],["The `IDeleteArea` interface defines a component that handles the deletion of blocks or bubbles dropped onto it. It extends the `IDragTarget` interface and includes one core method: `wouldDelete(element)`. This method determines if a dragged block or bubble would be deleted upon dropping within the area. It checks for deletability before any drag-related events.\n"],null,["[blockly](./blockly.md) \\\u003e [IDeleteArea](./blockly.ideletearea_interface.md)\n\nIDeleteArea interface\n---------------------\n\nInterface for a component that can delete a block or bubble that is dropped on top of it.\n\n**Signature:** \n\n export interface IDeleteArea extends IDragTarget \n\n**Extends:** [IDragTarget](./blockly.idragtarget_interface.md)\n\nMethods\n-------\n\n| Method | Description |\n|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [wouldDelete(element)](./blockly.ideletearea_interface.woulddelete_1_methodsignature.md) | Returns whether the provided block or bubble would be deleted if dropped on this area. This method should check if the element is deletable and is always called before onDragEnter/onDragOver/onDragExit. |"]]