From 1b128cae77d81d41ded03d30fbe78f0a896168d5 Mon Sep 17 00:00:00 2001 From: NicolasNewman Date: Sat, 6 Jul 2024 16:46:49 -0500 Subject: [PATCH] fix(arch): fixed error from eslint refactor --- .../mermaid/src/diagrams/architecture/svgDraw.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/mermaid/src/diagrams/architecture/svgDraw.ts b/packages/mermaid/src/diagrams/architecture/svgDraw.ts index d05a746f4..e8e651ebd 100644 --- a/packages/mermaid/src/diagrams/architecture/svgDraw.ts +++ b/packages/mermaid/src/diagrams/architecture/svgDraw.ts @@ -58,25 +58,25 @@ export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) { if (targetGroup) { if (isArchitectureDirectionX(targetDir)) { - endX = targetDir === 'L' ? -groupEdgeShift : groupEdgeShift; + endX += targetDir === 'L' ? -groupEdgeShift : groupEdgeShift; } else { - endY = targetDir === 'T' ? -groupEdgeShift : groupEdgeShift + 18; + endY += targetDir === 'T' ? -groupEdgeShift : groupEdgeShift + 18; } } // Adjust the edge distance if it doesn't have the {group} modifier and the endpoint is a junction node if (!sourceGroup && db.getNode(source)?.type === 'junction') { if (isArchitectureDirectionX(sourceDir)) { - startX = sourceDir === 'L' ? halfIconSize : -halfIconSize; + startX += sourceDir === 'L' ? halfIconSize : -halfIconSize; } else { - startY = sourceDir === 'T' ? halfIconSize : -halfIconSize; + startY += sourceDir === 'T' ? halfIconSize : -halfIconSize; } } if (!targetGroup && db.getNode(target)?.type === 'junction') { if (isArchitectureDirectionX(targetDir)) { - endX = targetDir === 'L' ? halfIconSize : -halfIconSize; + endX += targetDir === 'L' ? halfIconSize : -halfIconSize; } else { - endY = targetDir === 'T' ? halfIconSize : -halfIconSize; + endY += targetDir === 'T' ? halfIconSize : -halfIconSize; } }