Skip to content

Commit

Permalink
refactor: 툴팁 mouseout 변수 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yunchaehyun authored and flydog98 committed Dec 14, 2023
1 parent 1b76844 commit 6525fb5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/frontend/src/components/graph/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,10 @@ function renderD3(svgRef: RefObject<SVGGElement>, data: InitialDataProps[]) {
);

svg.select("#node").on("mouseout", (event) => {
const nodeNotHovered = !(
const hoverTooltip =
event.relatedTarget.nodeName === "rect" ||
event.relatedTarget.nodeName === "tspan"
);

if (nodeNotHovered) {
event.relatedTarget.nodeName === "tspan";
if (!hoverTooltip) {
svg.select("#tooltip").remove();
}
});
Expand Down

0 comments on commit 6525fb5

Please sign in to comment.