From e8a04efaf1b82560cbcf7694ac6c7dda1c82612f Mon Sep 17 00:00:00 2001
From: Adam Brangenberg <adambrangenberg@proton.me>
Date: Mon, 04 Sep 2023 04:28:57 +0000
Subject: [PATCH] feat(analytics): Support for Umami (#449)
---
quartz/components/scripts/graph.inline.ts | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/quartz/components/scripts/graph.inline.ts b/quartz/components/scripts/graph.inline.ts
index e84480e..d72b297 100644
--- a/quartz/components/scripts/graph.inline.ts
+++ b/quartz/components/scripts/graph.inline.ts
@@ -177,7 +177,7 @@
window.spaNavigate(new URL(targ, window.location.toString()))
})
.on("mouseover", function (_, d) {
- const neighbours: SimpleSlug[] = data[slug].links ?? []
+ const neighbours: SimpleSlug[] = data[fullSlug].links ?? []
const neighbourNodes = d3
.selectAll<HTMLElement, NodeData>(".node")
.filter((d) => neighbours.includes(d.id))
@@ -231,7 +231,9 @@
.attr("dy", (d) => -nodeRadius(d) + "px")
.attr("text-anchor", "middle")
.text(
- (d) => data[d.id]?.title || (d.id.charAt(1).toUpperCase() + d.id.slice(2)).replace("-", " "),
+ (d) =>
+ data[d.id]?.title ||
+ (d.id.charAt(0).toUpperCase() + d.id.slice(1, d.id.length - 1)).replace("-", " "),
)
.style("opacity", (opacityScale - 1) / 3.75)
.style("pointer-events", "none")
--
Gitblit v1.10.0