Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > IDeleteArea
Interfejs IDeleteArea
Interfejs komponentu, który może usunąć blok lub bańkę, które są na nim upuszczone.
Podpis:
export interface IDeleteArea extends IDragTarget
Rozszerza: IDragTarget
Metody
Metoda |
Opis |
wouldDelete(element) |
Zwraca, czy podany blok lub dymek został usunięty po upuszczeniu w tym obszarze. Ta metoda powinna sprawdzać, czy element można usunąć, i jest zawsze wywoływany przed onDragEnter/onDragOver/onDragExit. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-09-12 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2024-09-12 UTC."],[[["The IDeleteArea interface defines components that can delete blocks or bubbles dropped onto them."],["It extends the IDragTarget interface, inheriting drag-and-drop functionalities."],["The primary method, `wouldDelete`, checks if a given element would be deleted if dropped on the area, considering its deletability."]]],["The `IDeleteArea` interface defines a component that handles the deletion of blocks or bubbles dropped onto it. It extends the `IDragTarget` interface and includes one core method: `wouldDelete(element)`. This method determines if a dragged block or bubble would be deleted upon dropping within the area. It checks for deletability before any drag-related events.\n"]]