Skip to content

WorkspaceItem

Extends

Extended by

Constructors

new WorkspaceItem()

new WorkspaceItem(): WorkspaceItem

Returns

WorkspaceItem

Inherited from

Events.constructor

Properties

_

_: Record<string, EventsEntry[]>

Inherited from

Events._


app

app: App


component

component: Component


containerEl

containerEl: HTMLDivElement


dimension

dimension: null | number


id

id: string


parent

abstract parent: WorkspaceParent

The direct parent of the leaf.


parentSplit?

readonly optional parentSplit: WorkspaceParent


resizeHandleEl

resizeHandleEl: HTMLHRElement


type

type: string


workspace

workspace: Workspace

Methods

detach()

detach(): void

Returns

void


getContainer()

getContainer(): WorkspaceContainer

Get the root container parent item, which can be one of:

Returns

WorkspaceContainer


getIcon()

getIcon(): string

Returns

string


getRoot()

getRoot(): WorkspaceItem

Returns

WorkspaceItem


off()

off(name, callback): void

Parameters

name: string

callback

Returns

void

Inherited from

Events.off


offref()

offref(ref): void

Parameters

ref: EventRef

Returns

void

Inherited from

Events.offref


on()

on(name, callback, ctx?): EventRef

Parameters

name: string

callback

ctx?: any

Returns

EventRef

Inherited from

Events.on


onResizeStart()

onResizeStart(evt): void

Parameters

evt: MouseEvent

Returns

void


serialize()

serialize(): SerializedWorkspaceItem

Returns

SerializedWorkspaceItem


setDimension()

setDimension(dimension): void

Parameters

dimension: null | number

Returns

void


setParent()

setParent(parent): void

Parameters

parent: WorkspaceParent

Returns

void


trigger()

trigger(name, …data): void

Parameters

name: string

• …data: unknown[]

Returns

void

Inherited from

Events.trigger


tryTrigger()

tryTrigger(evt, args): void

Parameters

evt: EventRef

args: unknown[]

Returns

void

Inherited from

Events.tryTrigger