Skip to content

Commit 178c3b9

Browse files
committed
Added some addition events to make sure that it will draw text when new links are added, especially mutual links.
1 parent 3c99409 commit 178c3b9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ export default class GraphLinkTypesPlugin extends Plugin {
2323
this.handleLayoutChange();
2424
}));
2525

26+
this.registerEvent(this.app.metadataCache.on("dataview:index-ready", () => {
27+
console.log("Index ready, drawing graph link types.");
28+
this.handleLayoutChange();
29+
}));
30+
31+
this.registerEvent(this.app.metadataCache.on("dataview:metadata-change", () => {
32+
console.log("New metadata, drawing graph link types.");
33+
this.handleLayoutChange();
34+
}));
35+
2636
// // Add a command to the command palette
2737
// this.addCommand({
2838
// id: 'print-link-type',

0 commit comments

Comments
 (0)