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
Parameter | Type | Description |
---|---|---|
x | number | The x coordinate of the scrollbar's origin, in CSS pixels. |
y | number | The y coordinate of the scrollbar's origin, in CSS pixels. |
Returns:
void