blockly > WorkspaceSvg > scroll

WorkspaceSvg.scroll() method

Scroll the workspace to a specified offset (in pixels), keeping in the workspace bounds. See comment on workspaceSvg.scrollX for more detail on the meaning of these values.

Signature:

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

Parameters

Parameter Type Description
x number Target X to scroll to.
y number Target Y to scroll to.

Returns:

void