blockly > Events > ViewportChange > (constructor)
Events.ViewportChange.(constructor)
Constructs a new instance of the ViewportChange class
Signature:
constructor(opt_top?: number, opt_left?: number, opt_scale?: number, opt_workspaceId?: string, opt_oldScale?: number);
Parameters
| Parameter | Type | Description |
|---|---|---|
| opt_top | number | (Optional) Top-edge of the visible portion of the workspace, relative to the workspace origin. Undefined for a blank event. |
| opt_left | number | (Optional) Left-edge of the visible portion of the workspace relative to the workspace origin. Undefined for a blank event. |
| opt_scale | number | (Optional) The scale of the workspace. Undefined for a blank event. |
| opt_workspaceId | string | (Optional) The workspace identifier for this event. Undefined for a blank event. |
| opt_oldScale | number | (Optional) The old scale of the workspace. Undefined for a blank event. |