From 9da027cf74b3fc5d96e5bbd9719ce2c508f39a9c Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Sun, 17 May 2020 09:34:56 +0200 Subject: [PATCH] Fix for intersect issues for start/end state --- cypress/platform/current.html | 6 +++--- src/dagre-wrapper/nodes.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/platform/current.html b/cypress/platform/current.html index 029497218..0b2f7d3f6 100644 --- a/cypress/platform/current.html +++ b/cypress/platform/current.html @@ -46,7 +46,7 @@ flowchart LR click B "http://www.github.com" "This is a link" -
+
flowchart TD A[Christmas] -->|Get money| B(Go shopping) B --> C{Let me think} @@ -72,8 +72,8 @@ flowchart TD State4 --> [*] }
-
- stateDiagram +
+ stateDiagram-v2 [*] --> Still Still --> [*]
diff --git a/src/dagre-wrapper/nodes.js b/src/dagre-wrapper/nodes.js index 8d6057b1d..9e2679b53 100644 --- a/src/dagre-wrapper/nodes.js +++ b/src/dagre-wrapper/nodes.js @@ -380,7 +380,7 @@ const circle = (parent, node) => { updateNodeBounds(node, circle); node.intersect = function(point) { - return intersect.circle(node, point); + return intersect.circle(node, node.rx, point); }; return shapeSvg; @@ -430,7 +430,7 @@ const start = (parent, node) => { updateNodeBounds(node, circle); node.intersect = function(point) { - return intersect.circle(node, point); + return intersect.circle(node, 7, point); }; return shapeSvg; @@ -493,7 +493,7 @@ const end = (parent, node) => { updateNodeBounds(node, circle); node.intersect = function(point) { - return intersect.circle(node, point); + return intersect.circle(node, 7, point); }; return shapeSvg;