blockly > BlockSvg > moveBy
Methode BlockSvg.moveBy()
Verschieben Sie einen Block um einen relativen Versatz.
Unterschrift:
moveBy(dx: number, dy: number, reason?: string[]): void;
Parameter
Parameter |
Typ |
Beschreibung |
dx |
Zahl |
Horizontaler Offset in Arbeitsbereichseinheiten. |
T. |
Zahl |
Vertikaler Offset in Arbeitsbereichseinheiten. |
reason |
String[] |
(Optional) Was ist der Grund für diese Umstellung? „Ziehen“, „Bump“, „Schnappen“, ... |
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-09-09 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-09-09 (UTC)."],[[["The `moveBy` method shifts a block's position on the workspace by a specified horizontal (dx) and vertical (dy) offset."],["This method is part of the `BlockSvg` class within the Blockly library and is used to visually reposition blocks."],["An optional 'reason' parameter can be included to provide context for why the block is being moved, such as due to dragging, bumping, or snapping."]]],[]]