Skip to main content

Home > blockly > DeleteArea > wouldDelete

DeleteArea.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

ParameterTypeDescription
elementIDraggableThe block or bubble currently being dragged.

Returns:

boolean

Whether the element provided would be deleted if dropped on this area.