Skip to content

Commit

Permalink
feat(Vis View): ✨ Force Directed Graph: Highlight current note on graph
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Aug 15, 2021
1 parent 0773919 commit 5d437c0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/Visualisations/ForceDirectedG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,21 @@ export const forceDirectedG = (
.selectAll("circle")
.data(nodes)
.join("circle")
.attr("stroke", (d) => {
if (nameFromIndex(d) === currFile.basename) {
return "#ffffff";
} else {
return nodeColour;
}
})
.attr("r", 5)
.attr("fill", nodeColour)
.attr("fill", (d) => {
if (nameFromIndex(d) === currFile.basename) {
return "#ffffff";
} else {
return nodeColour;
}
})
.call(drag(simulation));

node.attr("aria-label", (d: d3Node) => d.name);
Expand Down

0 comments on commit 5d437c0

Please sign in to comment.