From 310420fda1c59c2dd9bf98648517673b1da637d2 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Thu, 22 Oct 2020 18:45:46 +0200 Subject: [PATCH 1/3] --- src/dagre-wrapper/edges.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dagre-wrapper/edges.js b/src/dagre-wrapper/edges.js index 255518612..257194abf 100644 --- a/src/dagre-wrapper/edges.js +++ b/src/dagre-wrapper/edges.js @@ -235,7 +235,7 @@ export const intersection = (node, outsidePoint, insidePoint) => { r = (R * q) / Q; const res = { x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - r, - y: outsidePoint.y + q + y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - q }; logger.warn(`topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); From 7c939860d6c626620f144cf5dd46fde7df3327d4 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Thu, 22 Oct 2020 18:47:32 +0200 Subject: [PATCH 2/3] #1740 Adding test --- .../integration/rendering/flowchart-v2.spec.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cypress/integration/rendering/flowchart-v2.spec.js b/cypress/integration/rendering/flowchart-v2.spec.js index d5c59a0fd..e335274b9 100644 --- a/cypress/integration/rendering/flowchart-v2.spec.js +++ b/cypress/integration/rendering/flowchart-v2.spec.js @@ -313,6 +313,22 @@ end {htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'} ); }); + it('57.x: handle nested subgraphs with outgoing links 5', () => { + imgSnapshotTest( + `%% this does not produce the desired result +flowchart TB + subgraph container_Beta + process_C-->Process_D + end + subgraph container_Alpha + process_A-->process_B + process_B-->|via_AWSBatch|container_Beta + process_A-->|messages|process_C + end + `, + {htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'} + ); + }); it('58: handle styling with style expressions', () => { imgSnapshotTest( ` From b495772118f29e941535330ba272de3a21d61bc1 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Thu, 22 Oct 2020 18:52:23 +0200 Subject: [PATCH 3/3] #1740 Adding fixing another tests --- src/dagre-wrapper/edges.spec.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dagre-wrapper/edges.spec.js b/src/dagre-wrapper/edges.spec.js index 9af180eda..1cdbf4c04 100644 --- a/src/dagre-wrapper/edges.spec.js +++ b/src/dagre-wrapper/edges.spec.js @@ -42,7 +42,8 @@ describe('Graphlib decorations', () => { } const int = intersection(node2, o, i); expect(int.x).toBeCloseTo(127.39979619565217) - expect(int.y).toBeCloseTo(76) + // expect(int.y).toBeCloseTo(76) + expect(int.y).toBeCloseTo(67.833) }); it('case 4 - intersection on top of box inside point greater then inside point', function () { @@ -56,7 +57,8 @@ describe('Graphlib decorations', () => { } const int = intersection(node2, o, i); expect(int.x).toBeCloseTo(167.9232336956522) - expect(int.y).toBeCloseTo(76) + // expect(int.y).toBeCloseTo(76) + expect(int.y).toBeCloseTo(67.833) }); });