Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > Zablokuj > utylizacja
Metoda Block.dispose()
Pozbądź się tej blokady.
Podpis:
dispose(healStack?: boolean): void;
Parametry
Parametr |
Typ |
Opis |
healStack |
wartość logiczna |
(Opcjonalnie) Jeśli tak, spróbuj uzupełnić brakujące informacje, łącząc następne stwierdzenie z poprzednim. W przeciwnym razie usuń wszystkie elementy podrzędne tej blokady. |
Zwroty:
nieważne
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: 2025-07-25 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: 2025-07-25 UTC."],[[["The `dispose()` method permanently removes a block from the workspace."],["It optionally takes a boolean argument, `healStack`, to determine whether to connect the surrounding blocks or dispose of all the block's children."],["By default, `healStack` is false, resulting in the removal of the block and all its nested components."],["When `healStack` is true, it attempts to maintain workspace continuity by connecting the preceding and succeeding blocks."]]],["The `Block.dispose()` method removes a block. It accepts an optional boolean parameter, `healStack`. If `healStack` is true, the method attempts to connect the next statement to the previous one, filling any gaps. If `healStack` is false or omitted, all child blocks of the disposed block are also removed. The method does not return any value.\n"]]