From 809720aeae5863cea2951af1211b141b47f8bf3b Mon Sep 17 00:00:00 2001 From: Vitaliy Stoliarov Date: Tue, 10 Apr 2018 01:58:34 +0300 Subject: [PATCH] fix engine --- src/editor.js | 2 +- src/engine.js | 6 +++--- test/data/recursive.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/editor.js b/src/editor.js index c8c3491e..88988ae0 100644 --- a/src/editor.js +++ b/src/editor.js @@ -210,8 +210,8 @@ export class NodeEditor { } this.eventListener.persistent = false; - this.clear(); + return true; } afterImport() { diff --git a/src/engine.js b/src/engine.js index dbba119d..412a2918 100644 --- a/src/engine.js +++ b/src/engine.js @@ -202,7 +202,7 @@ export class Engine { return true; } - async processStart(id) { + async processStartNode(id) { if (id) { let startNode = this.data.nodes[id]; @@ -231,8 +231,8 @@ export class Engine { this.data = this.copy(data); this.args = args; - this.processStart(startId); - this.processUnreachable(); + await this.processStartNode(startId); + await this.processUnreachable(); return this.processDone()?'success':'aborted'; } diff --git a/test/data/recursive.js b/test/data/recursive.js index 0ec70b20..1a59c621 100644 --- a/test/data/recursive.js +++ b/test/data/recursive.js @@ -21,7 +21,7 @@ export default { 'position': [ 80, 200 ], - 'title': 'Number' + 'title': 'name' }, '2': { 'id': 2, @@ -43,7 +43,7 @@ export default { 'position': [ 105.55555555555556, 516.6666666666666 ], - 'title': 'Number' + 'title': 'name' }, '3': { 'id': 3,