Stay organized with collections Save and categorize content based on your preferences.

blockly > IDeleteArea > wouldDelete

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


wouldDelete(element: IDraggable, couldConnect: boolean): boolean;


Parameter Type Description
element IDraggable The block or bubble currently being dragged.
couldConnect boolean Whether the element could could connect to another.



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