WorkspaceWindow
Official
Workspace window.
Import:
import { WorkspaceWindow } from 'obsidian';Signature:
export class WorkspaceWindow extends WorkspaceContainerExtends: WorkspaceContainer
Constructor
new WorkspaceWindow(workspace: Workspace, id?: string | undefined, size?: Record<string, number> | undefined)Constructor.
To get the constructor instance, use getWorkspaceWindowConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| direction | 'horizontal' | 'vertical' | The layout direction of the split. (Inherited from WorkspaceContainer) | |
| doc | Document | The document object. | |
| isResizing | boolean | Whether a resize drag is currently in progress. (Inherited from WorkspaceContainer) | |
| originalSizes | null | number[] | The child sizes captured at the start of a resize, or null when not resizing.(Inherited from WorkspaceContainer) | |
| parent | WorkspaceParent | The parent of the split. (Inherited from WorkspaceContainer) | |
| resizeStartPos | null | Point | The pointer position captured at the start of a resize, or null when not resizing.(Inherited from WorkspaceContainer) | |
| win | Window | The window object. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| close() | void | Closes the popout window, detaching its leaves. | |
| finishResize() | void | Finishes the current resize, persisting the new child sizes. (Inherited from WorkspaceContainer) | |
| focus() | void | Focuses the container's window (restoring it first if minimized, on desktop). (Inherited from WorkspaceContainer) | |
| getElSize(el) | number | undefined | Gets the size of an element along the split's direction. (Inherited from WorkspaceContainer) | |
| onChildResizeStart(child, event) | void | Handles the start of a resize initiated by a child. (Inherited from WorkspaceContainer) | |
| onFocus() | void | Handles the container's window gaining focus, updating the active leaf. (Inherited from WorkspaceContainer) | |
| onProximityResize(event) | void | Handles a proximity-based resize pointer event. (Inherited from WorkspaceContainer) | |
| resizeItemsByDiff(items, diff, sign) | number | Resizes the given items by a pixel difference. (Inherited from WorkspaceContainer) | |
| setDirection(direction) | void | Sets the layout direction of the split. (Inherited from WorkspaceContainer) | |
| setElSize(el, size) | void | Sets the size of an element along the split's direction. (Inherited from WorkspaceContainer) | |
| unsetElSize(el) | void | Clears the explicit size of an element. (Inherited from WorkspaceContainer) | |
| updateSize() | void | Updates the stored window size from the current Electron window bounds. | |
| updateTitle() | void | Updates the window title from the most recent leaf. |
Links to this page: