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 06bdb86b..d7ee6bfe 100644 --- a/src/views/dashboard/related/network-profiling/components/Graph/linkProcess.ts +++ b/src/views/dashboard/related/network-profiling/components/Graph/linkProcess.ts @@ -27,6 +27,9 @@ export const linkElement = (graph: any) => { [d.target.x, d.target.y - 5], 0.5 ); + if (d.lowerArc) { + controlPos[1] = -controlPos[1]; + } return ( "M" + d.source.x + @@ -57,6 +60,9 @@ export const anchorElement = (graph: any, funcs: any, tip: any) => { [d.target.x, d.target.y - 5], 0.5 ); + if (d.lowerArc) { + controlPos[1] = -controlPos[1]; + } const p = quadraticBezier( 0.5, { x: d.source.x, y: d.source.y - 5 }, diff --git a/src/views/dashboard/related/network-profiling/components/ProcessTopology.vue b/src/views/dashboard/related/network-profiling/components/ProcessTopology.vue index bd8e121b..40a42b58 100644 --- a/src/views/dashboard/related/network-profiling/components/ProcessTopology.vue +++ b/src/views/dashboard/related/network-profiling/components/ProcessTopology.vue @@ -297,15 +297,11 @@ function drawTopology(nodeArr: any[]) { // line element const obj = {} as any; const calls = networkProfilingStore.calls.reduce((prev: any[], next: any) => { - if ( - !( - obj[next.sourceId + next.targetId] && obj[next.targetId + next.sourceId] - ) - ) { - obj[next.sourceId + next.targetId] = true; - obj[next.targetId + next.sourceId] = true; - prev.push(next); + if (obj[next.targetId + next.sourceId]) { + next.lowerArc = true; } + obj[next.sourceId + next.targetId] = true; + prev.push(next); return prev; }, []);