From d0ef860e430a1b97adc9d8277483c9535396865a Mon Sep 17 00:00:00 2001 From: David Radley Date: Tue, 16 Mar 2021 15:16:48 +0000 Subject: [PATCH] #85 underline selected label Signed-off-by: David Radley --- .../components/visualisation/components/diagram/Diagram.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cra-client/src/components/GlossaryAuthor/components/visualisation/components/diagram/Diagram.js b/cra-client/src/components/GlossaryAuthor/components/visualisation/components/diagram/Diagram.js index 8be268b4..b5facb23 100644 --- a/cra-client/src/components/GlossaryAuthor/components/visualisation/components/diagram/Diagram.js +++ b/cra-client/src/components/GlossaryAuthor/components/visualisation/components/diagram/Diagram.js @@ -34,7 +34,7 @@ export default function Diagram(props) { * We need a force-directed sim, which ideally should be created on load of the component. * and only restarted when the data is updated. Unfortunately it cannot be made part of the * Diagram's state, otherwise animation does not work. This is true whether one attempts to - * use useState or useRef. So, unfortunately, it seeems to be necessary to make it soft. + * use useState or useRef. So, unfortunately, it seems to be necessary to make it soft. * This will mean that every rendering will cause the first useEffect to re-create it and * initialise it. It will be lost and recreated on each render. */ @@ -581,7 +581,8 @@ export default function Diagram(props) { .attr('stroke', d => (pinningRef.current && d.fx !== undefined && d.fx !== null) ? egeria_primary_color_string : "none"); nodes.selectAll('text') - .attr("fill", d => (d.id === focusGUID) ? egeria_text_color_string : "#444" ); + .attr("fill", d => (d.id === focusGUID) ? egeria_text_color_string : "#444" ) + .style("text-decoration", d => (d.id === focusGUID) ? "underline" : "none" ); const links = svg.selectAll(".link")