From 2c8cff96f2c5a580f02f1d36cfdd67213109f236 Mon Sep 17 00:00:00 2001 From: Keang Date: Sat, 11 Dec 2021 01:13:41 +1100 Subject: [PATCH 1/2] fix: Node weight filter function --- _includes/notes_graph.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/notes_graph.html b/_includes/notes_graph.html index 4807b85..7dbf3e6 100644 --- a/_includes/notes_graph.html +++ b/_includes/notes_graph.html @@ -60,7 +60,7 @@ let weight = 3 * Math.sqrt( - linksData.filter((l) => l.source === el.id || l.target === el.id) + linksData.filter((l) => l.source.id === el.id || l.target.id === el.id) .length + 1 ); if (weight < MINIMAL_NODE_SIZE) { From a1b08aa30057f3b31d779f92a3bff41461b11761 Mon Sep 17 00:00:00 2001 From: Keang Date: Sat, 11 Dec 2021 01:17:59 +1100 Subject: [PATCH 2/2] fix: Same edge function --- _includes/notes_graph.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/notes_graph.html b/_includes/notes_graph.html index 7dbf3e6..e4a2e49 100644 --- a/_includes/notes_graph.html +++ b/_includes/notes_graph.html @@ -151,7 +151,7 @@ } for (const edge of next) { - if (!set.has(`${edge.source}-${edge.target}`)) { + if (!set.has(`${edge.source.id}-${edge.target.id}`)) { return false; } }