Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
blockly > Feld > onLocationChange
Methode "Field.onLocationChange()"
Informiert das Feld darüber, dass sich die Position geändert hat.
Unterschrift:
onLocationChange(_: Coordinate): void;
Parameter
Parameter |
Typ |
Beschreibung |
_ |
Koordinaten |
Die Position der oberen Startecke dieses Feldblocks in Arbeitsbereichskoordinaten. |
Gibt zurück:
voidm
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-10-11 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-10-11 (UTC)."],[[["The `onLocationChange` method is called when a field's location within the workspace changes."],["This method receives the new location of the field's block as a `Coordinate` object, representing the top-left corner in workspace coordinates."],["It allows fields to react and adjust to changes in their position within the workspace, enabling dynamic behavior based on location."]]],["The `Field.onLocationChange()` method notifies a field that its location has changed. It accepts one parameter, `_`, which is a `Coordinate` object. This `Coordinate` represents the top-start corner of the field's block within the workspace's coordinate system. The method has no return value (void). It essentially informs the field about its new position within the Blockly workspace.\n"]]