From 6df1c9a4286d0b7d9e6348f5de68c7bb974443f5 Mon Sep 17 00:00:00 2001 From: Tal Ben-Nun Date: Thu, 5 Sep 2024 18:05:13 +0200 Subject: [PATCH] Self-edge layouting Nicer visualization? @phschaad --- src/layouter/state_machine/sm_layouter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouter/state_machine/sm_layouter.ts b/src/layouter/state_machine/sm_layouter.ts index 25fcd31a..4c7259bf 100644 --- a/src/layouter/state_machine/sm_layouter.ts +++ b/src/layouter/state_machine/sm_layouter.ts @@ -884,7 +884,7 @@ export class SMLayouter { if (edge[0] === edge[1]) { // Self edge. const nodeLeftX = src.x - (src.width / 2); - const edgeLeftX = nodeLeftX - BACKEDGE_SPACING; + const edgeLeftX = nodeLeftX - BACKEDGE_SPACING / 2; const edgeBottomY = src.y + (src.height / 4); const edgeTopY = src.y - (src.height / 4); edgeData.points = [