From 64b658db73752f216c7040a10c01c4cbbd61e609 Mon Sep 17 00:00:00 2001 From: jonaslagoni Date: Sat, 15 Oct 2022 20:11:44 +0200 Subject: [PATCH] fix: switching between edge types did not work correctly for animated --- library/src/visualiser/helpers/collect-nodes.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/library/src/visualiser/helpers/collect-nodes.ts b/library/src/visualiser/helpers/collect-nodes.ts index 4807882..af44dc8 100644 --- a/library/src/visualiser/helpers/collect-nodes.ts +++ b/library/src/visualiser/helpers/collect-nodes.ts @@ -191,7 +191,7 @@ export function collectSystemNodes( const edge = { id: `${appId}-to-${incomingApp}`, ...(edgeType !== 'animated' - ? { type: edgeType } + ? { type: edgeType, animated: false } : { animated: true }), style: { stroke: 'orange', strokeWidth: 4 }, source: appId, @@ -360,7 +360,9 @@ export function createIncomingNode( }; const connectionEdge: Edge = { id: `incoming-${appId}-${data.id}`, - ...(edgeType !== 'animated' ? { type: edgeType } : { animated: true }), + ...(edgeType !== 'animated' + ? { type: edgeType, animated: false } + : { animated: true }), style: { stroke: '#7ee3be', strokeWidth: 4 }, target: appId, source: data.id, @@ -397,7 +399,9 @@ export function createOutgoingNode( }; const connectionEdge: Edge = { id: `outgoing-${appId}-${data.id}`, - ...(edgeType !== 'animated' ? { type: edgeType } : { animated: true }), + ...(edgeType !== 'animated' + ? { type: edgeType, animated: false } + : { animated: true }), style: { stroke: 'orange', strokeWidth: 4 }, source: appId, target: data.id,