blockly > BlockSvg > translate
BlockSvg.translate() method
Transforms a block by setting the translation on the transform attribute of the block's SVG.
Signature:
translate(x: number, y: number): void;
Parameters
Parameter | Type | Description |
---|---|---|
x | number | The x coordinate of the translation in workspace units. |
y | number | The y coordinate of the translation in workspace units. |
Returns:
void