Skip to main content

blockly > WorkspaceSvg > translate

WorkspaceSvg.translate() method

Translate this workspace to new coordinates.

Signature:

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

Parameters

Parameter

Type

Description

x

number

Horizontal translation, in pixel units relative to the top left of the Blockly div.

y

number

Vertical translation, in pixel units relative to the top left of the Blockly div.

Returns:

void