DeleteArea class
Abstract class for a component that can delete a block or bubble that is dropped on top of it.
Signature:
export declare class DeleteArea extends DragTarget implements IDeleteArea
Extends: DragTarget
Implements: IDeleteArea
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)() | Constructor for DeleteArea. Should not be called directly, only by a subclass. |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
id | string | The unique id for this component that is used to register with the ComponentManager. | |
wouldDelete_ | protected |
boolean | Whether the last block or bubble dragged over this delete area would be deleted if dropped on this component. This property is not updated after the block or bubble is deleted. |
Methods
Method | Modifiers | Description |
---|---|---|
updateWouldDelete_(wouldDelete) | protected |
Updates the internal wouldDelete_ state. |
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. |