Skip to content

WorkspaceParent

Official

Workspace parent.

Import:

import { WorkspaceParent } from 'obsidian';

Signature:

export class WorkspaceParent extends WorkspaceItem

Extends: WorkspaceItem

Constructor

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

Constructor.

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

Properties

Property Type Description
_ Record<string, EventsEntry[]> Internal storage of registered event handlers by event name.
(Inherited from WorkspaceItem)
allowSingleChild boolean Whether this parent is allowed to contain a single child (rather than collapsing it).
app App Reference to the app instance.
(Inherited from WorkspaceItem)
autoManageDOM boolean Whether this parent automatically manages the DOM of its children.
children WorkspaceItem[] The child items contained in this parent.
component Component The component managing the lifecycle of this workspace item.
(Inherited from WorkspaceItem)
containerEl HTMLDivElement Container element for this workspace item.
(Inherited from WorkspaceItem)
dimension null | number The flex-grow dimension of this item within its parent split.
(Inherited from WorkspaceItem)
id string Unique identifier for this workspace item.
(Inherited from WorkspaceItem)
parent WorkspaceParent The direct parent of the leaf.
(Inherited from WorkspaceItem)
resizeHandleEl HTMLHRElement The resize handle element used for adjusting item dimensions.
(Inherited from WorkspaceItem)
type string The type identifier for this workspace item (e.g. 'leaf', 'split', 'tabs').
(Inherited from WorkspaceItem)
workspace Workspace Reference to the workspace this item belongs to.
(Inherited from WorkspaceItem)

Methods

Method Returns Description
detach() void Detach this item from its parent.
(Inherited from WorkspaceItem)
getContainer() WorkspaceContainer Get the root container parent item, which can be one of:. - WorkspaceRoot - WorkspaceWindow
(Inherited from WorkspaceItem)
getIcon() IconName Get the icon name for this workspace item.
(Inherited from WorkspaceItem)
getRoot() WorkspaceItem Get the root item.
(Inherited from WorkspaceItem)
insertChild(index, child) void Inserts a child at the given index.
off(name, callback) void Remove an event listener.
(Inherited from WorkspaceItem)
offref(ref) void Remove an event listener by reference.
(Inherited from WorkspaceItem)
on(name, callback, ctx?) EventRef Add an event listener.
(Inherited from WorkspaceItem)
onResizeStart(evt) void Handle the start of a resize operation on this item.
(Inherited from WorkspaceItem)
recomputeChildrenDimensions() void Recomputes the dimensions of the children.
removeChild(child) void Removes a child.
replaceChild(index, child) void Replaces the child at the given index.
serialize() SerializedWorkspaceItem Serialize this workspace item's state for persistence.
(Inherited from WorkspaceItem)
setDimension(dimension) void Set the flex-grow dimension of this item within its parent split.
(Inherited from WorkspaceItem)
setParent(parent) void Set the parent split for this workspace item.
(Inherited from WorkspaceItem)
trigger(name, data?) void Trigger an event, executing all the listeners in order even if some of them throw an error.
(Inherited from WorkspaceItem)
tryTrigger(evt, args) void Try to trigger an event, executing all the listeners in order even if some of them throw an error.
(Inherited from WorkspaceItem)

Links to this page: