Skip to main content

Home > 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

ParameterTypeDescription
xnumberTarget X to scroll to.
ynumberTarget Y to scroll to.

Returns:

void