From 4d530f961219fb32aa010affd36b67789b7a90ba Mon Sep 17 00:00:00 2001 From: break60 <790061044@qq.com> Date: Mon, 3 Aug 2020 11:10:08 +0800 Subject: [PATCH] Before creating a workflow, clear the canvas --- .../src/js/conf/home/pages/dag/_source/dag.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js index ff8a4528d5..5a41091029 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/dag.js @@ -52,7 +52,9 @@ Dag.prototype.setConfig = function (o) { */ Dag.prototype.create = function () { const self = this - jsPlumb.ready(() => { + let plumbIns = jsPlumb.getInstance() + plumbIns.reset() + plumbIns.ready(() => { JSP.init({ dag: this.dag, instance: this.instance, @@ -304,7 +306,9 @@ Dag.prototype.backfill = function (arg) { locationsValue = dataObject const self = this - jsPlumb.ready(() => { + let plumbIns = jsPlumb.getInstance() + plumbIns.reset() + plumbIns.ready(() => { JSP.init({ dag: this.dag, instance: this.instance, @@ -326,7 +330,9 @@ Dag.prototype.backfill = function (arg) { }) } else { const self = this - jsPlumb.ready(() => { + let plumbIns = jsPlumb.getInstance() + plumbIns.reset() + plumbIns.ready(() => { JSP.init({ dag: this.dag, instance: this.instance,