קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > IDeleteArea > wouldDelete
שיטת IDeleteArea.wouldDelete()
הפונקציה מחזירה אם הבלוק או הבועה שסופקו יימחקו אם יושמטו על האזור. השיטה הזו תבדוק אם ניתן למחוק את הרכיב והוא תמיד מופעל לפני onDragEnter/onDragOver/onDragExit.
Signature:
wouldDelete(element: IDraggable): boolean;
פרמטרים
| פרמטר |
סוג |
תיאור |
| רכיב |
IDraggable |
הבלוק או הבועה שגוררים כרגע. |
החזרות:
בוליאני
האם הרכיב שסופק יימחק אם ישחרר אותו באזור הזה.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-25 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-25 (שעון UTC)."],[],["The `wouldDelete()` method, part of the `IDeleteArea` interface, determines if a dragged element will be deleted upon being dropped. It takes an `IDraggable` element (a block or bubble) as input. The method returns a boolean value, indicating whether the element would be deleted. This check for deletability happens prior to other drag-related events like `onDragEnter`, `onDragOver`, and `onDragExit`.\n"]]