WorkspaceLeaf class
Signature:
export class WorkspaceLeaf extends WorkspaceItem
Extends: WorkspaceItem
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
isDeferred | readonly | boolean | Returns true if this leaf is currently deferred because it is in the background. A deferred leaf will have a DeferredView as its view, instead of the View that it should normally have for its type (like MarkdownView for the markdown type). 1.7.2 |
parent | WorkspaceTabs | WorkspaceMobileDrawer | The direct parent of the leaf. On desktop, a leaf is always a child of a | |
view | View | The view associated with this leaf. Do not attempt to cast this to your custom View without first checking instanceof . |
Methods
Method | Modifiers | Description |
---|---|---|
detach() | ||
getContainer() | Get the root container parent item, which can be one of: - WorkspaceRoot - WorkspaceWindow (Inherited from WorkspaceItem) | |
getDisplayText() | ||
getEphemeralState() | ||
getIcon() | ||
getRoot() | (Inherited from WorkspaceItem) | |
getViewState() | ||
loadIfDeferred() | If this view is currently deferred, load it and await that it has fully loaded. 1.7.2 | |
off(name, callback) | (Inherited from Events) | |
offref(ref) | (Inherited from Events) | |
on(name: 'pinned-change', callback, ctx) | ||
on(name: 'group-change', callback, ctx) | ||
onResize() | ||
open(view) | ||
openFile(file, openState) | Open a file in this leaf. | |
setEphemeralState(state) | ||
setGroup(group) | ||
setGroupMember(other) | ||
setPinned(pinned) | ||
setViewState(viewState, eState) | ||
togglePinned() | ||
trigger(name, data) | (Inherited from Events) | |
tryTrigger(evt, args) | (Inherited from Events) |