Merge pull request #4571 from break60/dev

[fixbug-4570][ui] When deleting a workflow connection, all connections disappear
This commit is contained in:
xingchun-chen 2021-01-26 16:49:47 +08:00 committed by GitHub
commit 27e36aa306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -627,6 +627,7 @@ JSP.prototype.saveStore = function () {
tasks.push(tasksParam)
}
})
if (store.state.dag.connects.length === this.JspInstance.getConnections().length) {
_.map(store.state.dag.connects, u => {
connects.push({
@ -658,6 +659,14 @@ JSP.prototype.saveStore = function () {
label: v._jsPlumb.overlays.label.canvas.innerText
})
})
} else if (store.state.dag.connects.length > this.JspInstance.getConnections().length) {
_.map(this.JspInstance.getConnections(), v => {
connects.push({
endPointSourceId: v.sourceId,
endPointTargetId: v.targetId,
label: v._jsPlumb.overlays.label.canvas.innerText
})
})
}
_.map(tasksAll(), v => {