Stay organized with collections
Save and categorize content based on your preferences.
blockly > dragging > Dragger > wouldDeleteDraggable
dragging.Dragger.wouldDeleteDraggable() method
Returns true if we would delete the draggable if it was dropped at the current location.
Signature:
protected wouldDeleteDraggable(e: PointerEvent, rootDraggable: IDraggable & IDeletable): boolean;
Parameters
Returns:
boolean
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 2025-05-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-16 UTC."],[[["The `wouldDeleteDraggable()` method, part of Blockly's dragging system, predicts if a draggable element would be deleted if dropped at its current location."],["It takes a PointerEvent and the draggable/deletable element as input, returning true if deletion is likely and false otherwise."],["This method helps in providing visual feedback to the user during drag-and-drop interactions by indicating potential deletion before the drop action is completed."]]],["The `wouldDeleteDraggable()` method, part of the `Dragger` class within the `dragging` namespace, determines if a draggable object would be deleted if released at its current position. It accepts a `PointerEvent` and a `draggable` object (implementing both `IDraggable` and `IDeletable` interfaces) as parameters. It returns a boolean value indicating whether deletion would occur. This function essentially checks if the current location would prompt to delete the draggable.\n"]]