Workspace.on('resize') method
Workspace › on(‘resize’)
Official
Triggered when a WorkspaceItem is resized or the workspace layout has changed.Signature:
on(name: "resize", callback: () => unknown, ctx?: unknown): EventRefParameters:
| Parameter | Type | Description |
|---|---|---|
| name | "resize" | Should be 'resize'. |
| callback | () => unknown | The callback function. |
| ctx? | unknown | The context passed as this to the callback function. |
Returns: EventRef — The event reference.
Example:
app.workspace.on('resize', () => { console.log('resize');});