From 00b99614b0492384fe1b865bc6c92b67eca4f793 Mon Sep 17 00:00:00 2001 From: Doug Martin Date: Thu, 13 Jul 2023 07:49:14 -0400 Subject: [PATCH] feat: Add feedback during edge creation [PT-185596251] --- src/components/graph.scss | 4 ++++ src/components/graph.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/src/components/graph.scss b/src/components/graph.scss index 954c7f4..76058bc 100644 --- a/src/components/graph.scss +++ b/src/components/graph.scss @@ -11,4 +11,8 @@ .rubberband { pointer-events: none; } + + svg ellipse.can-add-edge:hover { + fill: lightgreen; + } } \ No newline at end of file diff --git a/src/components/graph.tsx b/src/components/graph.tsx index 9c41b66..707dc25 100644 --- a/src/components/graph.tsx +++ b/src/components/graph.tsx @@ -367,6 +367,7 @@ export const Graph = (props: Props) => { const circles = nodes .append("ellipse") + .attr("class", drawingMode === "addEdge" ? "can-add-edge" : "") .attr("fill", "#fff") .attr("stroke", "#999") .attr("stroke-width", d => 2)