Skip to main content

Home > blockly > BlockSvg > moveTo

BlockSvg.moveTo() method

Move a block to a position.

Signature:

moveTo(xy: Coordinate, reason?: string[]): void;

Parameters

ParameterTypeDescription
xyCoordinateThe position to move to in workspace units.
reasonstring[](Optional) Why is this move happening? 'drag', 'bump', 'snap', ...

Returns:

void