blockly > Toolbox > wouldDelete
Toolbox.wouldDelete() method
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.
Signature:
wouldDelete(element: IDraggable): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
element | IDraggable | The block or bubble currently being dragged. |
Returns:
boolean
Whether the element provided would be deleted if dropped on this area.