Workspace โ€บ getLeaf

Workspace.getLeaf() method

If newLeaf is false (or not set) then an existing leaf which can be navigated is returned, or a new leaf will be created if there was no leaf available.

If newLeaf is 'tab' or true then a new leaf will be created in the preferred location within the root split and returned.

If newLeaf is 'split' then a new leaf will be created adjacent to the currently active leaf.

If newLeaf is 'window' then a popout window will be created with a new leaf inside.

Signature:

getLeaf(newLeaf?: PaneType | boolean): WorkspaceLeaf;

Parameters

ParameterTypeDescription
newLeafPaneType | boolean(Optional)

Returns:

WorkspaceLeaf