blockly > Events > ViewportChange
Events.ViewportChange class
Notifies listeners that the workspace surface's position or scale has changed.
Does not notify when the workspace itself resizes.
Signature:
export declare class ViewportChange extends UiBase
Extends: UiBase
Constructors
Constructor | Modifiers | Description |
|---|---|---|
(constructor)(opt_top, opt_left, opt_scale, opt_workspaceId, opt_oldScale) | Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
number | (Optional) The previous scale of the workspace. | ||
number | (Optional) The scale of the workpace. | ||
EventType | |||
number | (Optional) The left edge of the visible portion of the workspace, relative to the workspace origin. | ||
number | (Optional) Top edge of the visible portion of the workspace, relative to the workspace origin. |
Methods
Method | Modifiers | Description |
|---|---|---|
Encode the event as JSON. |