Skip to content

Commit

Permalink
Added some addition events to make sure that it will draw text when n…
Browse files Browse the repository at this point in the history
…ew links are added, especially mutual links.
  • Loading branch information
natefrisch01 committed Jan 11, 2024
1 parent 3c99409 commit 178c3b9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ export default class GraphLinkTypesPlugin extends Plugin {
this.handleLayoutChange();
}));

this.registerEvent(this.app.metadataCache.on("dataview:index-ready", () => {
console.log("Index ready, drawing graph link types.");
this.handleLayoutChange();
}));

this.registerEvent(this.app.metadataCache.on("dataview:metadata-change", () => {
console.log("New metadata, drawing graph link types.");
this.handleLayoutChange();
}));

// // Add a command to the command palette
// this.addCommand({
// id: 'print-link-type',
Expand Down

0 comments on commit 178c3b9

Please sign in to comment.