|
|
@ -168,7 +168,16 @@ async function drawGraph(baseUrl, isHome, pathColors, graphConfig) {
|
|
|
|
.style("cursor", "pointer")
|
|
|
|
.style("cursor", "pointer")
|
|
|
|
.on("click", (_, d) => {
|
|
|
|
.on("click", (_, d) => {
|
|
|
|
// SPA navigation
|
|
|
|
// SPA navigation
|
|
|
|
window.Million.navigate(new URL(`${baseUrl}${decodeURI(d.id).replace(/\s+/g, "-")}/`), ".singlePage")
|
|
|
|
const targ = `${baseUrl}${decodeURI(d.id).replace(/\s+/g, "-")}/`
|
|
|
|
|
|
|
|
window.Million.navigate(new URL(targ), ".singlePage")
|
|
|
|
|
|
|
|
plausible("Link Click", {
|
|
|
|
|
|
|
|
props: {
|
|
|
|
|
|
|
|
href: targ,
|
|
|
|
|
|
|
|
broken: false,
|
|
|
|
|
|
|
|
internal: true,
|
|
|
|
|
|
|
|
graph: true,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.on("mouseover", function(_, d) {
|
|
|
|
.on("mouseover", function(_, d) {
|
|
|
|
d3.selectAll(".node").transition().duration(100).attr("fill", "var(--g-node-inactive)")
|
|
|
|
d3.selectAll(".node").transition().duration(100).attr("fill", "var(--g-node-inactive)")
|
|
|
|