Skip to content

LocalGraphView

Defined in: src/obsidian/internals/InternalPlugins/Graph/LocalGraphView.d.ts:9

Extends

Properties

_children

_children: Component[]

Defined in: src/obsidian/augmentations/Components/Component.d.ts:9

Child Components attached to current component, will be unloaded on unloading parent component

Inherited from

InfoFileView._children


_events

_events: EventRef[]

Defined in: src/obsidian/augmentations/Components/Component.d.ts:13

Events that are attached to the current component, will be detached on unloading parent component

Inherited from

InfoFileView._events


_loaded

_loaded: boolean

Defined in: src/obsidian/augmentations/Components/Component.d.ts:17

Whether the component and its children are loaded

Inherited from

InfoFileView._loaded


actionsEl

actionsEl: HTMLElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:9

Container of actions for the view

Inherited from

InfoFileView.actionsEl


allowNoFile

allowNoFile: boolean

Defined in: obsidian.d.ts:1701

Inherited from

InfoFileView.allowNoFile


app

app: App

Defined in: obsidian.d.ts:4461

Inherited from

InfoFileView.app


backButtonEl

backButtonEl: HTMLButtonElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:13

Back button element for changing view history

Inherited from

InfoFileView.backButtonEl


canDropAnywhere

canDropAnywhere: boolean

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:17

Whether the view may be dropped anywhere in workspace

Inherited from

InfoFileView.canDropAnywhere


closeable

closeable: boolean

Defined in: src/obsidian/augmentations/Views/View.d.ts:10

Whether the leaf may close the view

Inherited from

InfoFileView.closeable


containerEl

containerEl: HTMLElement

Defined in: obsidian.d.ts:4484

Inherited from

InfoFileView.containerEl


contentEl

contentEl: HTMLElement

Defined in: obsidian.d.ts:2056

Inherited from

InfoFileView.contentEl


engine

engine: GraphEngine

Defined in: src/obsidian/internals/InternalPlugins/Graph/LocalGraphView.d.ts:10


file

file: null | TFile

Defined in: obsidian.d.ts:1705

Inherited from

InfoFileView.file


forwardButtonEl

forwardButtonEl: HTMLButtonElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:21

Forward button element for changing view history

Inherited from

InfoFileView.forwardButtonEl


headerEl

headerEl: HTMLElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:25

Header bar container of view

Inherited from

InfoFileView.headerEl


icon

icon: string

Defined in: obsidian.d.ts:4465

Inherited from

InfoFileView.icon


iconEl

iconEl: HTMLElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:29

Icon element for the view (for dragging)

Inherited from

InfoFileView.iconEl


leaf

leaf: WorkspaceLeaf

Defined in: obsidian.d.ts:4480

Inherited from

InfoFileView.leaf


moreOptionsButtonEl

moreOptionsButtonEl: HTMLAnchorElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:33

Anchor button for revealing more view actions

Inherited from

InfoFileView.moreOptionsButtonEl


navigation: boolean

Defined in: obsidian.d.ts:1711

Whether or not the view is intended for navigation. If your view is a static view that is not intended to be navigated away, set this to false. (For example: File explorer, calendar, etc.) If your view opens a file or can be otherwise navigated, set this to true. (For example: Markdown editor view, Kanban view, PDF view, etc.)

Inherited from

InfoFileView.navigation


renderer

renderer: GraphRenderer

Defined in: src/obsidian/internals/InternalPlugins/Graph/LocalGraphView.d.ts:11


scope

scope: null | Scope

Defined in: obsidian.d.ts:4496

Assign an optional scope to your view to register hotkeys for when the view is in focus.

Example

this.scope = new Scope(this.app.scope);

Default

null
@public

Inherited from

InfoFileView.scope


titleContainerEl

titleContainerEl: HTMLElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:37

Container for the title of the view

Inherited from

InfoFileView.titleContainerEl


titleEl

titleEl: HTMLElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:41

Title element for the view

Inherited from

InfoFileView.titleEl


titleParentEl

titleParentEl: HTMLElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:47

Title of the parent

Inherited from

InfoFileView.titleParentEl

Methods

addAction()

Call Signature

addAction(icon, title, callback): HTMLElement

Defined in: obsidian.d.ts:2066

Parameters
icon

string

title

string

callback

(evt) => any

Returns

HTMLElement

Inherited from

InfoFileView.addAction

Call Signature

addAction(icon, title, callback): HTMLElement

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:55

Adds an action button to the header of the view

Parameters
icon

string

The icon for the action

title

string

The title for the action

callback

(evt) => any

Callback to execute on click

Returns

HTMLElement

Inherited from

InfoFileView.addAction


addChild()

addChild<T>(component): T

Defined in: obsidian.d.ts:887

Adds a child component, loading it if this component is loaded

Type Parameters

T extends Component

Parameters

component

T

Returns

T

Inherited from

InfoFileView.addChild


canAcceptExtension()

Call Signature

canAcceptExtension(extension): boolean

Defined in: obsidian.d.ts:1751

Parameters
extension

string

Returns

boolean

Inherited from

InfoFileView.canAcceptExtension

Call Signature

canAcceptExtension(extension): boolean

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:15

Determines whether the specified file extension can be opened in this view.

Parameters
extension

string

The file extension to be evaluated

Returns

boolean

Inherited from

InfoFileView.canAcceptExtension


close()

close(): Promise<void>

Defined in: src/obsidian/augmentations/Views/View.d.ts:21

Closes the view

Returns

Promise<void>

Inherited from

InfoFileView.close


getDisplayText()

getDisplayText(): string

Defined in: obsidian.d.ts:1720

Returns

string

Inherited from

InfoFileView.getDisplayText


getEphemeralState()

Call Signature

getEphemeralState(): Record<string, unknown>

Defined in: obsidian.d.ts:4525

Returns

Record<string, unknown>

Inherited from

InfoFileView.getEphemeralState

Call Signature

getEphemeralState(): object

Defined in: src/obsidian/augmentations/Views/View.d.ts:25

Gets the ephemeral (non-persistent) state of the editor

Returns

object

Inherited from

InfoFileView.getEphemeralState


getIcon()

Call Signature

getIcon(): string

Defined in: obsidian.d.ts:4533

Returns

string

Inherited from

InfoFileView.getIcon

Call Signature

getIcon(): string

Defined in: src/obsidian/augmentations/Views/View.d.ts:29

Returns the icon name

Returns

string

Inherited from

InfoFileView.getIcon


getSideTooltipPlacement()

getSideTooltipPlacement(): undefined | "left" | "right"

Defined in: src/obsidian/augmentations/Views/View.d.ts:33

Returns the placement of the tooltip

Returns

undefined | "left" | "right"

Inherited from

InfoFileView.getSideTooltipPlacement


getState()

getState(): Record<string, unknown>

Defined in: obsidian.d.ts:1728

Returns

Record<string, unknown>

Inherited from

InfoFileView.getState


getSyncViewState()

getSyncViewState(): any

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:19

Get view state for sync plugin

Returns

any

Inherited from

InfoFileView.getSyncViewState


getViewType()

getViewType(): "localgraph"

Defined in: src/obsidian/internals/InternalPlugins/Graph/LocalGraphView.d.ts:16

Get the current view type

Returns

"localgraph"

Overrides

InfoFileView.getViewType


handleCopy()

handleCopy(event): void

Defined in: src/obsidian/augmentations/Views/View.d.ts:41

Handle copy event on metadata editor and serialize properties

Parameters

event

ClipboardEvent

Returns

void

Inherited from

InfoFileView.handleCopy


handleCut()

handleCut(event): void

Defined in: src/obsidian/augmentations/Views/View.d.ts:45

Handle cut event on metadata editor and serialize and remove properties

Parameters

event

ClipboardEvent

Returns

void

Inherited from

InfoFileView.handleCut


handleDrop()

handleDrop(event, t, n): unknown

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:57

Parameters

event

DragEvent

t

unknown

n

unknown

Returns

unknown

Inherited from

InfoFileView.handleDrop


handlePaste()

handlePaste(event): void

Defined in: src/obsidian/augmentations/Views/View.d.ts:49

Handle paste event of properties on metadata editor

Parameters

event

ClipboardEvent

Returns

void

Inherited from

InfoFileView.handlePaste


load()

load(): void

Defined in: obsidian.d.ts:865

Load this component and its children

Returns

void

Inherited from

InfoFileView.load


loadFile()

loadFile(file): Promise<unknown>

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:24

Loads the file with the onLoadFile function

Parameters

file

TFile

The File to load

Returns

Promise<unknown>

Inherited from

InfoFileView.loadFile


onClose()

onClose(): Promise<void>

Defined in: obsidian.d.ts:4509

Returns

Promise<void>

Inherited from

InfoFileView.onClose


onDelete()

onDelete(file): Promise<void>

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:29

Updates the view if it contains the deleted file

Parameters

file

TFile

The file that is deleted

Returns

Promise<void>

Inherited from

InfoFileView.onDelete


onFileChanged()

onFileChanged(file): void

Defined in: src/obsidian/internals/InternalPlugins/Graph/LocalGraphView.d.ts:21

Requests a update if the changed file is the opened file

Parameters

file

TFile

The changed file

Returns

void


onFileOpen()

onFileOpen(file): void

Defined in: src/obsidian/internals/Views/InfoFileView.d.ts:13

Called when a file is opened. Loads the file and requests a content update

Parameters

file

TFile

The opened file

Returns

void

Inherited from

InfoFileView.onFileOpen


onGroupChange()

onGroupChange(): void

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:59

Returns

void

Inherited from

InfoFileView.onGroupChange


onHeaderMenu()

onHeaderMenu(e): void

Defined in: src/obsidian/augmentations/Views/View.d.ts:51

Parameters

e

unknown

Returns

void

Inherited from

InfoFileView.onHeaderMenu


onload()

onload(): void

Defined in: obsidian.d.ts:1724

Returns

void

Inherited from

InfoFileView.onload


onLoadFile()

Call Signature

onLoadFile(file): Promise<void>

Defined in: obsidian.d.ts:1738

Parameters
file

TFile

Returns

Promise<void>

Inherited from

InfoFileView.onLoadFile

Call Signature

onLoadFile(file): Promise<void>

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:34

Is called when a file get loaded

Parameters
file

TFile

The file that is loaded

Returns

Promise<void>

Inherited from

InfoFileView.onLoadFile


onMoreOptions()

onMoreOptions(event): void

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:61

Parameters

event

Event

Returns

void

Inherited from

InfoFileView.onMoreOptions


onMoreOptionsMenu()

onMoreOptionsMenu(e): void

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:63

Parameters

e

unknown

Returns

void

Inherited from

InfoFileView.onMoreOptionsMenu


onOpen()

onOpen(): Promise<void>

Defined in: obsidian.d.ts:4505

Returns

Promise<void>

Inherited from

InfoFileView.onOpen


onOptionsChange()

onOptionsChange(): void

Defined in: src/obsidian/internals/InternalPlugins/Graph/LocalGraphView.d.ts:25

Updates the options from the plugin when changed in view

Returns

void


onPaneMenu()

onPaneMenu(menu, source): void

Defined in: obsidian.d.ts:4549

Populates the pane menu.

(Replaces the previously removed onHeaderMenu and onMoreOptionsMenu)

Parameters

Menu

source

string

Returns

void

Inherited from

InfoFileView.onPaneMenu


onRename()

Call Signature

onRename(file): Promise<void>

Defined in: obsidian.d.ts:1746

Parameters
file

TFile

Returns

Promise<void>

Inherited from

InfoFileView.onRename

Call Signature

onRename(file): Promise<void>

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:39

Updates the view information based on the new file name

Parameters
file

TFile

The file that is renamed

Returns

Promise<void>

Inherited from

InfoFileView.onRename


onResize()

onResize(): void

Defined in: obsidian.d.ts:4538

Called when the size of this view is changed.

Returns

void

Inherited from

InfoFileView.onResize


onTabMenu()

onTabMenu(menu): void

Defined in: src/obsidian/augmentations/Views/View.d.ts:56

Adds the menu items to the menu

Parameters

Menu

the menu to fill

Returns

void

Inherited from

InfoFileView.onTabMenu


onunload()

onunload(): void

Defined in: obsidian.d.ts:882

Override this to unload your component

Returns

void

Inherited from

InfoFileView.onunload


onUnloadFile()

Call Signature

onUnloadFile(file): Promise<void>

Defined in: obsidian.d.ts:1742

Parameters
file

TFile

Returns

Promise<void>

Inherited from

InfoFileView.onUnloadFile

Call Signature

onUnloadFile(file): Promise<void>

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:44

Is called when a file get unloaded

Parameters
file

TFile

The file that is unloaded

Returns

Promise<void>

Inherited from

InfoFileView.onUnloadFile


open()

open(parentEl): Promise<void>

Defined in: src/obsidian/augmentations/Views/View.d.ts:61

Opens the view

Parameters

parentEl

Node

The node the view get attached to

Returns

Promise<void>

Inherited from

InfoFileView.open


register()

register(cb): void

Defined in: obsidian.d.ts:897

Registers a callback to be called when unloading

Parameters

cb

() => any

Returns

void

Inherited from

InfoFileView.register


registerDomEvent()

Call Signature

registerDomEvent<K>(el, type, callback, options?): void

Defined in: obsidian.d.ts:907

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof WindowEventMap

Parameters
el

Window

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

InfoFileView.registerDomEvent

Call Signature

registerDomEvent<K>(el, type, callback, options?): void

Defined in: obsidian.d.ts:912

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof DocumentEventMap

Parameters
el

Document

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

InfoFileView.registerDomEvent

Call Signature

registerDomEvent<K>(el, type, callback, options?): void

Defined in: obsidian.d.ts:917

Registers an DOM event to be detached when unloading

Type Parameters

K extends keyof HTMLElementEventMap

Parameters
el

HTMLElement

type

K

callback

(this, ev) => any

options?

boolean | AddEventListenerOptions

Returns

void

Inherited from

InfoFileView.registerDomEvent


registerEvent()

registerEvent(eventRef): void

Defined in: obsidian.d.ts:902

Registers an event to be detached when unloading

Parameters

eventRef

EventRef

Returns

void

Inherited from

InfoFileView.registerEvent


registerInterval()

registerInterval(id): number

Defined in: obsidian.d.ts:924

Registers an interval (from setInterval) to be cancelled when unloading Use setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API

Parameters

id

number

Returns

number

Inherited from

InfoFileView.registerInterval


registerScopeEvent()

registerScopeEvent(keymapEventHandler): void

Defined in: src/obsidian/augmentations/Components/Component.d.ts:19

Parameters

keymapEventHandler

KeymapEventHandler

Returns

void

Inherited from

InfoFileView.registerScopeEvent


removeChild()

removeChild<T>(component): T

Defined in: obsidian.d.ts:892

Removes a child component, unloading it

Type Parameters

T extends Component

Parameters

component

T

Returns

T

Inherited from

InfoFileView.removeChild


renderBreadcrumbs()

renderBreadcrumbs(): void

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:46

Returns

void

Inherited from

InfoFileView.renderBreadcrumbs


setEphemeralState()

Call Signature

setEphemeralState(state): void

Defined in: obsidian.d.ts:4529

Parameters
state

unknown

Returns

void

Inherited from

InfoFileView.setEphemeralState

Call Signature

setEphemeralState(state): void

Defined in: src/obsidian/augmentations/Views/View.d.ts:65

Set the ephemeral (non-persistent) state of the editor

Parameters
state

any

Returns

void

Inherited from

InfoFileView.setEphemeralState


setState()

setState(state, result): Promise<void>

Defined in: obsidian.d.ts:1733

Parameters

state

any

result

ViewStateResult

Returns

Promise<void>

Inherited from

InfoFileView.setState


syncState()

syncState(e): Promise<unknown>

Defined in: src/obsidian/augmentations/Views/FileView.d.ts:48

Parameters

e

boolean

Returns

Promise<unknown>

Inherited from

InfoFileView.syncState


unload()

unload(): void

Defined in: obsidian.d.ts:876

Unload this component and its children

Returns

void

Inherited from

InfoFileView.unload


update()

update(): void

Defined in: src/obsidian/internals/InternalPlugins/Graph/LocalGraphView.d.ts:29

Renders the graph

Returns

void


updateNavButtons()

updateNavButtons(): void

Defined in: src/obsidian/augmentations/Views/ItemView.d.ts:67

Updates the navigation buttons depending on the history

Returns

void

Inherited from

InfoFileView.updateNavButtons