From 34762c9eb0ceab32a939493613a3818f01d81094 Mon Sep 17 00:00:00 2001 From: Fine Date: Tue, 30 Aug 2022 10:47:45 +0800 Subject: [PATCH] update line --- .../network-profiling/components/Graph/linkProcess.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/dashboard/related/network-profiling/components/Graph/linkProcess.ts b/src/views/dashboard/related/network-profiling/components/Graph/linkProcess.ts index 562a509f..29f25618 100644 --- a/src/views/dashboard/related/network-profiling/components/Graph/linkProcess.ts +++ b/src/views/dashboard/related/network-profiling/components/Graph/linkProcess.ts @@ -30,7 +30,10 @@ export const linkElement = (graph: any) => { 0.5 ); if (d.lowerArc) { - controlPos[1] = -controlPos[1] - 10; + controlPos[1] = + Math.abs(controlPos[1]) < 50 + ? -controlPos[1] + 90 + : controlPos[1] - 10; } return ( "M" + @@ -141,7 +144,8 @@ function getMidpoint(d: Call) { 0.5 ); if (d.lowerArc) { - controlPos[1] = -controlPos[1]; + controlPos[1] = + Math.abs(controlPos[1]) < 50 ? -controlPos[1] + 100 : controlPos[1] - 10; } const p = quadraticBezier( 0.5,