Skip to main content

Home > blockly > Scrollbar > setOrigin

Scrollbar.setOrigin() method

Record the origin of the workspace that the scrollbar is in, in pixels relative to the injection div origin. This is for times when the scrollbar is used in an object whose origin isn't the same as the main workspace (e.g. in a flyout.)

Signature:

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

Parameters

ParameterTypeDescription
xnumberThe x coordinate of the scrollbar's origin, in CSS pixels.
ynumberThe y coordinate of the scrollbar's origin, in CSS pixels.

Returns:

void