Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
blockly > dragging > Dragger > wouldDeleteDraggable
Méthode dragging.Dragger.wouldDeleteDraggable()
Renvoie la valeur "true" si nous supprimons l'élément déplaçable s'il est déposé à l'emplacement actuel.
Signature :
protected wouldDeleteDraggable(e: PointerEvent, rootDraggable: IDraggable & IDeletable): boolean;
Paramètres
Renvoie :
booléen
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/05/16 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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"]]