Skip to content

WorkspaceSidedock

Official

Workspace sidedock.

Import:

import { WorkspaceSidedock } from 'obsidian';

Signature:

export class WorkspaceSidedock extends WorkspaceSplit

Extends: WorkspaceSplit

Constructor

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

Constructor.

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

Properties

Property Type Description
allowSingleChild boolean Whether the sidedock allows only a single child tab group.
autoManageDOM boolean Whether the sidedock automatically manages its DOM elements.
children WorkspaceTabs[] Child tab groups within this sidedock.
collapsed boolean Whether the sidedock is collapsed.
direction 'horizontal' | 'vertical' Layout direction of the sidedock split.
emptyStateEl HTMLDivElement Element displayed when the sidedock has no content.
isResizing boolean Whether the sidedock is currently being resized.
originalSizes null Original sizes of children before a resize operation.
parent WorkspaceParent The parent of the split.
(Inherited from WorkspaceSplit)
resizeStartPos null Starting position of the current resize operation.
side string Which side of the workspace this sidedock is on (e.g. 'left' or 'right').
size number Width of the sidedock in pixels.

Methods

Method Returns Description
collapse() void Collapse the sidedock.
expand() void Expand the sidedock.
finishResize() void Finishes the current resize, persisting the new child sizes.
(Inherited from WorkspaceSplit)
getElSize(el) number | undefined Gets the size of an element along the split's direction.
(Inherited from WorkspaceSplit)
onChildResizeStart(child, event) void Handles the start of a resize initiated by a child.
(Inherited from WorkspaceSplit)
onSidedockResizeStart(evt) void Handle the start of a sidedock resize operation.
recomputeChildrenDimensions() void Recalculate the dimensions of child tab groups.
resizeItemsByDiff(items, diff, sign) number Resizes the given items by a pixel difference.
(Inherited from WorkspaceSplit)
serialize() SerializedWorkspaceSidedock Serialize the sidedock state for persistence.
setDirection(direction) void Sets the layout direction of the split.
(Inherited from WorkspaceSplit)
setElSize(el, size) void Sets the size of an element along the split's direction.
(Inherited from WorkspaceSplit)
setSize(size) void Set the width of the sidedock in pixels.
toggle() void Toggle the sidedock.
unsetElSize(el) void Clears the explicit size of an element.
(Inherited from WorkspaceSplit)

Links to this page: