TypedWorkspaceLeaf
Defined in: src/obsidian/internals/TypedWorkspaceLeaf.d.ts:8
Extends
Type Parameters
• TView extends View
Properties
_
_:
Record
<string
,EventsEntry
[]>
Defined in: src/obsidian/augmentations/Events.d.ts:5
Inherited from
activeTime?
optional
activeTime:number
Defined in: src/obsidian/augmentations/WorkspaceLeaf.d.ts:5
Inherited from
app
app:
App
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:5
Inherited from
component
component:
Component
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:6
Inherited from
containerEl
containerEl:
HTMLDivElement
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:7
Inherited from
dimension
dimension:
null
|number
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:8
Inherited from
id
id:
string
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:9
Inherited from
parent
parent:
WorkspaceMobileDrawer
|WorkspaceTabs
Defined in: obsidian.d.ts:5021
The direct parent of the leaf.
On desktop, a leaf is always a child of a WorkspaceTabs
component.
On mobile, a leaf might be a child of a WorkspaceMobileDrawer
.
Perform an instanceof
check before making an assumption about the
parent
.
Inherited from
parentSplit?
readonly
optional
parentSplit:WorkspaceParent
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:10
Inherited from
resizeHandleEl
resizeHandleEl:
HTMLHRElement
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:11
Inherited from
tabHeaderEl
tabHeaderEl:
HTMLElement
Defined in: src/obsidian/augmentations/WorkspaceLeaf.d.ts:6
Inherited from
tabHeaderInnerIconEl
tabHeaderInnerIconEl:
HTMLElement
Defined in: src/obsidian/augmentations/WorkspaceLeaf.d.ts:7
Inherited from
WorkspaceLeaf
.tabHeaderInnerIconEl
tabHeaderInnerTitleEl
tabHeaderInnerTitleEl:
HTMLElement
Defined in: src/obsidian/augmentations/WorkspaceLeaf.d.ts:8
Inherited from
WorkspaceLeaf
.tabHeaderInnerTitleEl
type
type:
string
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:12
Inherited from
view
view:
MaybeDeferredView
<TView
>
Defined in: src/obsidian/internals/TypedWorkspaceLeaf.d.ts:9
The view associated with this leaf. Do not attempt to cast this to your
custom View
without first checking instanceof
.
Overrides
workspace
workspace:
Workspace
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:13
Inherited from
Accessors
isDeferred
Get Signature
get isDeferred():
boolean
Defined in: node_modules/obsidian/obsidian.d.ts:5058
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).
Since
1.7.2
Returns
boolean
Inherited from
Methods
detach()
detach():
void
Defined in: obsidian.d.ts:5093
Returns
void
Inherited from
getContainer()
getContainer():
WorkspaceContainer
Defined in: obsidian.d.ts:5002
Get the root container parent item, which can be one of:
Returns
Inherited from
getDisplayText()
getDisplayText():
string
Defined in: obsidian.d.ts:5102
Returns
string
Inherited from
getEphemeralState()
getEphemeralState():
any
Defined in: obsidian.d.ts:5069
Returns
any
Inherited from
WorkspaceLeaf
.getEphemeralState
getIcon()
getIcon():
string
Defined in: obsidian.d.ts:5098
Returns
string
Inherited from
getRoot()
getRoot():
WorkspaceItem
Defined in: obsidian.d.ts:4995
Returns
Inherited from
getViewState()
getViewState():
ViewState
Defined in: obsidian.d.ts:5046
Returns
Inherited from
loadIfDeferred()
loadIfDeferred():
Promise
<void
>
Defined in: obsidian.d.ts:5064
If this view is currently deferred, load it and await that it has fully loaded.
Returns
Promise
<void
>
Since
1.7.2
Inherited from
off()
off(
name
,callback
):void
Defined in: obsidian.d.ts:1441
Parameters
name
string
callback
(…data
) => unknown
Returns
void
Inherited from
offref()
offref(
ref
):void
Defined in: obsidian.d.ts:1445
Parameters
ref
Returns
void
Inherited from
on()
Call Signature
on(
name
,callback
,ctx
?):EventRef
Defined in: obsidian.d.ts:5112
Parameters
name
"pinned-change"
callback
(pinned
) => any
ctx?
any
Returns
Inherited from
Call Signature
on(
name
,callback
,ctx
?):EventRef
Defined in: obsidian.d.ts:5116
Parameters
name
"group-change"
callback
(group
) => any
ctx?
any
Returns
Inherited from
Call Signature
on(
name
,callback
,ctx
?):EventRef
Defined in: src/obsidian/augmentations/WorkspaceLeaf.d.ts:14
Triggers when the leaf’s history gets updated (e.g. when new file is opened, or moving through history)
Parameters
name
"history-change"
callback
() => void
ctx?
unknown
Returns
Inherited from
Call Signature
on(
name
,callback
,ctx
?):EventRef
Defined in: src/obsidian/augmentations/WorkspaceLeaf.d.ts:18
Triggers when context menu action is executed on the leaf
Parameters
name
"leaf-menu"
callback
(menu
, leaf
) => void
ctx?
unknown
Returns
Inherited from
onResize()
onResize():
void
Defined in: obsidian.d.ts:5107
Returns
void
Inherited from
onResizeStart()
onResizeStart(
evt
):void
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:17
Parameters
evt
Returns
void
Inherited from
open()
Defined in: obsidian.d.ts:5041
Parameters
view
Returns
Inherited from
openFile()
openFile(
file
,openState
?):Promise
<void
>
Defined in: obsidian.d.ts:5036
By default, openFile
will also make the leaf active.
Pass in { active: false }
to override.
Parameters
file
openState?
Returns
Promise
<void
>
Inherited from
openLinkText()
openLinkText(
linktext
,sourcePath
,openViewState
?):Promise
<void
>
Defined in: src/obsidian/augmentations/WorkspaceLeaf.d.ts:25
Open a link in the current leaf
Parameters
linktext
string
The link text to open
sourcePath
string
The path of the source file
openViewState?
The view state to open the link in
Returns
Promise
<void
>
Inherited from
serialize()
serialize():
SerializedWorkspaceItem
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:18
Returns
Inherited from
setDimension()
setDimension(
flexgrow
?):void
Defined in: src/obsidian/augmentations/WorkspaceLeaf.d.ts:35
Set the vertical height a leaf may occupy if it is in a split. The height is not set directly, but by setting the flex-grow (css) of the element. This means to predictably affect the height, you also need to use setDimension on the other leafs of the column. (The flex-grow values of every leaf work basically like a ratio, e.g. 1:2 meaning the first leaf takes 33% of the height, and the second 67%.)
Parameters
flexgrow?
Sets the flex-grow of the leaf. (0-100)
null
| number
Returns
void
Inherited from
setEphemeralState()
setEphemeralState(
state
):void
Defined in: obsidian.d.ts:5073
Parameters
state
any
Returns
void
Inherited from
WorkspaceLeaf
.setEphemeralState
setGroup()
setGroup(
group
):void
Defined in: obsidian.d.ts:5089
Parameters
group
string
Returns
void
Inherited from
setGroupMember()
setGroupMember(
other
):void
Defined in: obsidian.d.ts:5085
Parameters
other
Returns
void
Inherited from
setParent()
setParent(
parent
):void
Defined in: src/obsidian/augmentations/WorkspaceItem.d.ts:20
Parameters
parent
Returns
void
Inherited from
setPinned()
setPinned(
pinned
):void
Defined in: obsidian.d.ts:5081
Parameters
pinned
boolean
Returns
void
Inherited from
setViewState()
setViewState(
viewState
,eState
?):Promise
<void
>
Defined in: obsidian.d.ts:5050
Parameters
viewState
eState?
any
Returns
Promise
<void
>
Inherited from
togglePinned()
togglePinned():
void
Defined in: obsidian.d.ts:5077
Returns
void
Inherited from
trigger()
trigger(
name
, …data
):void
Defined in: obsidian.d.ts:1449
Parameters
name
string
data
…unknown
[]
Returns
void
Inherited from
tryTrigger()
tryTrigger(
evt
,args
):void
Defined in: obsidian.d.ts:1453
Parameters
evt
args
unknown
[]
Returns
void