Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > Connection
Klasa połączenia
Klasa dla połączenia między blokami.
Podpis:
export declare class Connection
Zespoły
Właściwości
Metody
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-05-16 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-05-16 UTC."],[[["The `Connection` class in Blockly manages connections between blocks, enabling them to link and interact."],["It provides methods for connecting, disconnecting, and checking compatibility between connections."],["Connections have properties like `type` and `targetConnection` to define their role and relationships."],["`Connection` includes functionality for managing shadow blocks, which provide placeholders or default values."],["Developers can use methods like `getCheck`, `setCheck`, and `isConnected` to control and query connection states."]]],["The `Connection` class manages connections between blocks. Key actions include: connecting (`connect`, `connect_`), disconnecting (`disconnect`, `disconnectInternal`) and reconnecting blocks (`reconnect`). It manages connection compatibility (`getCheck`, `setCheck`), determines connection status (`isConnected`, `isSuperior`), and provides methods to manage shadow blocks (`getShadowDom`, `setShadowDom`, `respawnShadow_`). The class also defines constants for connection compatibility checks, providing reason codes. Methods exist to get block targets (`targetBlock`, `getSourceBlock`).\n"]]