From e72c3b2c865dd8289497e690849d8b5ad4665b48 Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Mon, 30 Mar 2020 21:40:14 +0200 Subject: [PATCH] #1295 Re-enabling state diagram tests --- src/dagre-wrapper/intersect/intersect-rect.js | 1 - src/diagrams/state/stateDb.js | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/dagre-wrapper/intersect/intersect-rect.js b/src/dagre-wrapper/intersect/intersect-rect.js index 9847f9897..f8c03a2af 100644 --- a/src/dagre-wrapper/intersect/intersect-rect.js +++ b/src/dagre-wrapper/intersect/intersect-rect.js @@ -2,7 +2,6 @@ const intersectRect = (node, point) => { var x = node.x; var y = node.y; - console.log(node, point); // Rectangle intersection algorithm from: // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes var dx = point.x - x; diff --git a/src/diagrams/state/stateDb.js b/src/diagrams/state/stateDb.js index 9b8031f75..c4842cc60 100644 --- a/src/diagrams/state/stateDb.js +++ b/src/diagrams/state/stateDb.js @@ -30,8 +30,13 @@ const getRootDocV2 = () => { return rootDoc; }; -const extract = doc => { +const extract = root => { // const res = { states: [], relations: [] }; + let doc = root.doc; + if (!doc) { + doc = root; + } + logger.info(root.doc); clear(); doc.forEach(item => {