From 0dba08232b36f60c1172049120aaa86f2b977276 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sun, 31 Mar 2024 14:34:04 -0400 Subject: [PATCH] format --- .../src/components/TreeDisplay.tsx | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/packages/ott-vis-panel/src/components/TreeDisplay.tsx b/packages/ott-vis-panel/src/components/TreeDisplay.tsx index b3bf89c14..325fd71b3 100644 --- a/packages/ott-vis-panel/src/components/TreeDisplay.tsx +++ b/packages/ott-vis-panel/src/components/TreeDisplay.tsx @@ -245,15 +245,18 @@ const TreeDisplay: React.FC = ({ const [chartTransform, setChartTransform] = useState("translate(0, 0)"); - const getRadius = useCallback((group: string): number => { - if (group === "client") { - return clientNodeRadius; - } else if (group === "balancer") { - return balancerNodeRadius; - } else { - return baseNodeRadius; - } - }, [baseNodeRadius, balancerNodeRadius, clientNodeRadius]); + const getRadius = useCallback( + (group: string): number => { + if (group === "client") { + return clientNodeRadius; + } else if (group === "balancer") { + return balancerNodeRadius; + } else { + return baseNodeRadius; + } + }, + [baseNodeRadius, balancerNodeRadius, clientNodeRadius] + ); useEffect(() => { if (svgRef.current) { @@ -668,7 +671,10 @@ const TreeDisplay: React.FC = ({ .ease(d3.easeCubicOut) .attrTween("stroke", () => d3.interpolateRgb("#0f0", "#fff")) .attrTween("stroke-width", () => t => d3.interpolateNumber(4, 1.5)(t).toString()) - .attrTween("r", () => t => d3.interpolateNumber(newRadius, endRadius)(t).toString()); + .attrTween( + "r", + () => t => d3.interpolateNumber(newRadius, endRadius)(t).toString() + ); }); return () => {