fix(arch): fixed error from eslint refactor

This commit is contained in:
NicolasNewman 2024-07-06 16:46:49 -05:00
parent a94fe811dd
commit 1b128cae77

View File

@ -58,25 +58,25 @@ export const drawEdges = function (edgesEl: D3Element, cy: cytoscape.Core) {
if (targetGroup) { if (targetGroup) {
if (isArchitectureDirectionX(targetDir)) { if (isArchitectureDirectionX(targetDir)) {
endX = targetDir === 'L' ? -groupEdgeShift : groupEdgeShift; endX += targetDir === 'L' ? -groupEdgeShift : groupEdgeShift;
} else { } 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 // 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 (!sourceGroup && db.getNode(source)?.type === 'junction') {
if (isArchitectureDirectionX(sourceDir)) { if (isArchitectureDirectionX(sourceDir)) {
startX = sourceDir === 'L' ? halfIconSize : -halfIconSize; startX += sourceDir === 'L' ? halfIconSize : -halfIconSize;
} else { } else {
startY = sourceDir === 'T' ? halfIconSize : -halfIconSize; startY += sourceDir === 'T' ? halfIconSize : -halfIconSize;
} }
} }
if (!targetGroup && db.getNode(target)?.type === 'junction') { if (!targetGroup && db.getNode(target)?.type === 'junction') {
if (isArchitectureDirectionX(targetDir)) { if (isArchitectureDirectionX(targetDir)) {
endX = targetDir === 'L' ? halfIconSize : -halfIconSize; endX += targetDir === 'L' ? halfIconSize : -halfIconSize;
} else { } else {
endY = targetDir === 'T' ? halfIconSize : -halfIconSize; endY += targetDir === 'T' ? halfIconSize : -halfIconSize;
} }
} }