Bug fixed detaching processes
This commit is contained in:
1 parent
ad92b95295
commit
255f8c90b0
2 files changed
+10
-2
No files matched your search
@@ -103,7 +103,13 @@ function newAttachDetach () {
|
||||
return
|
||||
}
|
||||
case 'Process': {
|
||||
node.payload.parentNode.process = undefined
|
||||
let payload = node.payload
|
||||
for (let i = 0; i < payload.parentNode.processes.length; i++) {
|
||||
let process = payload.parentNode.processes[i]
|
||||
if (process.id === node.id) {
|
||||
payload.parentNode.processes.splice(i, 1)
|
||||
}
|
||||
}
|
||||
completeDetachment(node, rootNodes)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -508,21 +508,23 @@ function newPartsFromNodes () {
|
||||
|
||||
function addProcess (node) {
|
||||
let process = {
|
||||
name: 'New Process',
|
||||
code: '// Write the configuration here.'
|
||||
}
|
||||
|
||||
switch (node.type) {
|
||||
case 'Sensor': {
|
||||
process.subType = 'Sensor Process'
|
||||
process.name = 'Sensor Process'
|
||||
break
|
||||
}
|
||||
case 'Indicator': {
|
||||
process.subType = 'Indicator Process'
|
||||
process.name = 'Indicator Process'
|
||||
break
|
||||
}
|
||||
case 'Trading Engine': {
|
||||
process.subType = 'Trading Engine Process'
|
||||
process.name = 'Trading Engine Process'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user