Skip to content

Commit

Permalink
La-7 Adjust active edge width
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucano Vera committed Dec 6, 2024
1 parent d7d3307 commit df44a66
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,22 @@ const TaxonomyTreeEdge = (props: TaxonomyTreeEdgeProps) => {
}
}, [targetNodeHoverStatus]);

const getStrokeWidth = useCallback(() => {
switch (targetNodeHoverStatus) {
case TreeNodeHoverStatus.ACTIVE_HOVER:
case TreeNodeHoverStatus.PARENT_OF_HOVER:
return 2;
default:
return 1;
}
}, [targetNodeHoverStatus]);

return (
<BezierEdge
{...props}
style={{
stroke: getStrokeColor(),
strokeWidth: 1,
strokeWidth: getStrokeWidth(),
transition: "stroke 0.3s ease 0s",
}}
/>
Expand Down

0 comments on commit df44a66

Please sign in to comment.