Skip to main content

Home > blockly > WorkspaceSvg > translate

WorkspaceSvg.translate() method

Translate this workspace to new coordinates.

Signature:

translate(x: number, y: number): void;

Parameters

ParameterTypeDescription
xnumberHorizontal translation, in pixel units relative to the top left of the Blockly div.
ynumberVertical translation, in pixel units relative to the top left of the Blockly div.

Returns:

void