Skip to main content

Home > blockly > IBoundedElement > moveBy

IBoundedElement.moveBy() method

Move the element by a relative offset.

Signature:

moveBy(dx: number, dy: number, reason?: string[]): void;

Parameters

ParameterTypeDescription
dxnumberHorizontal offset in workspace units.
dynumberVertical offset in workspace units.
reasonstring[](Optional) Why is this move happening? 'user', 'bump', 'snap'...

Returns:

void