blockly > IBoundedElement > moveBy
IBoundedElement.moveBy() method
Move the element by a relative offset.
Signature:
moveBy(dx: number, dy: number, reason?: string[]): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| dx | number | Horizontal offset in workspace units. |
| dy | number | Vertical offset in workspace units. |
| reason | string[] | (Optional) Why is this move happening? 'user', 'bump', 'snap'... |
Returns:
void