Skip to content

WorkspaceContainer

Official

Workspace container.

Import:

import { WorkspaceContainer } from 'obsidian';

Signature:

export class WorkspaceContainer extends WorkspaceSplit

Extends: WorkspaceSplit

Constructor

new WorkspaceContainer(workspace: Workspace, direction: string, id?: string | undefined)

Constructor.

To get the constructor instance, use getWorkspaceSplitConstructor from obsidian-typings/implementations.

Properties

PropertyTypeDescription
direction'horizontal' | 'vertical'The layout direction of the split.
(Inherited from WorkspaceSplit)
docDocument
isResizingbooleanWhether a resize drag is currently in progress.
(Inherited from WorkspaceSplit)
originalSizesnull | number[]The child sizes captured at the start of a resize, or null when not resizing.
(Inherited from WorkspaceSplit)
parentWorkspaceParentThe parent of the split.
(Inherited from WorkspaceSplit)
resizeStartPosnull | PointThe pointer position captured at the start of a resize, or null when not resizing.
(Inherited from WorkspaceSplit)
winWindow

Methods

MethodReturnsDescription
finishResize()voidFinishes the current resize, persisting the new child sizes.
(Inherited from WorkspaceSplit)
focus()voidFocuses the container's window (restoring it first if minimized, on desktop).
getElSize(el)number | undefinedGets the size of an element along the split's direction.
(Inherited from WorkspaceSplit)
onChildResizeStart(child, event)voidHandles the start of a resize initiated by a child.
(Inherited from WorkspaceSplit)
onFocus()voidHandles the container's window gaining focus, updating the active leaf.
onProximityResize(event)voidHandles a proximity-based resize pointer event.
(Inherited from WorkspaceSplit)
resizeItemsByDiff(items, diff, sign)numberResizes the given items by a pixel difference.
(Inherited from WorkspaceSplit)
setDirection(direction)voidSets the layout direction of the split.
(Inherited from WorkspaceSplit)
setElSize(el, size)voidSets the size of an element along the split's direction.
(Inherited from WorkspaceSplit)
unsetElSize(el)voidClears the explicit size of an element.
(Inherited from WorkspaceSplit)

Links to this page: