Skip to content
This repository has been archived by the owner on Oct 29, 2022. It is now read-only.

Commit

Permalink
fix: switching between edge types did not work correctly for animated
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed Oct 15, 2022
1 parent 802c018 commit 64b658d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions library/src/visualiser/helpers/collect-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 64b658d

Please sign in to comment.