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

PropertyTypeDescription
allowSingleChildbooleanWhether the sidedock allows only a single child tab group.
autoManageDOMbooleanWhether the sidedock automatically manages its DOM elements.
childrenWorkspaceTabs[]Child tab groups within this sidedock.
collapsedbooleanWhether the sidedock is collapsed.
direction'horizontal' | 'vertical'Layout direction of the sidedock split.
emptyStateElHTMLDivElementElement displayed when the sidedock has no content.
isResizingbooleanWhether the sidedock is currently being resized.
originalSizesnullOriginal sizes of children before a resize operation.
parentWorkspaceParentThe parent of the split.
(Inherited from WorkspaceSplit)
resizeStartPosnullStarting position of the current resize operation.
sidestringWhich side of the workspace this sidedock is on (e.g. 'left' or 'right').
sizenumberWidth of the sidedock in pixels.

Methods

MethodReturnsDescription
collapse()voidCollapse the sidedock.
expand()voidExpand the sidedock.
finishResize()voidFinishes the current resize, persisting the new child sizes.
(Inherited from WorkspaceSplit)
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)
onProximityResize(event)voidHandles a proximity-based resize pointer event.
(Inherited from WorkspaceSplit)
onSidedockResizeStart(evt)voidHandle the start of a sidedock resize operation.
recomputeChildrenDimensions()voidRecalculate the dimensions of child tab groups.
resizeItemsByDiff(items, diff, sign)numberResizes the given items by a pixel difference.
(Inherited from WorkspaceSplit)
serialize()SerializedWorkspaceSidedockSerialize the sidedock state for persistence.
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)
setSize(size)voidSet the width of the sidedock in pixels.
toggle()voidToggle the sidedock.
unsetElSize(el)voidClears the explicit size of an element.
(Inherited from WorkspaceSplit)

Links to this page: