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.
[null,null,["Last updated 2024-09-18 UTC."],[[["The IDeleteArea interface defines components that can delete blocks or bubbles dropped onto them."],["It extends the IDragTarget interface, inheriting drag-and-drop functionalities."],["The primary method, `wouldDelete`, checks if a given element would be deleted if dropped on the area, considering its deletability."]]],["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"]]