Deleting sutuation without removing floating object
This commit is contained in:
1 parent
cf30ff38a2
commit
29aed3f4a2
2 files changed
+10
-2
No files matched your search
@@ -100,7 +100,7 @@ function newCircularMenuItem () {
|
||||
}
|
||||
|
||||
function onMouseClick (event) {
|
||||
payload.onMenuItemClick(payload, action)
|
||||
payload.onMenuItemClick(payload, thisObject.action)
|
||||
}
|
||||
|
||||
function drawBackground () {
|
||||
@@ -157,3 +157,4 @@ function newCircularMenuItem () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,13 @@ function newStrategyCollectionItem () {
|
||||
|
||||
break
|
||||
case 'Delete Situation':
|
||||
|
||||
for (let i = 0; i < payload.parentNode.situations.length; i++) {
|
||||
let situation = payload.parentNode.situations[i]
|
||||
if (situation.name === payload.node.name) {
|
||||
payload.parentNode.situations.splice(i)
|
||||
return
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'Delete Condition':
|
||||
|
||||
@@ -396,3 +402,4 @@ function newStrategyCollectionItem () {
|
||||
browserCanvasContext.drawImage(thisObject.icon, point1.x - IMAGE_SIZE / 2, point1.y - IMAGE_SIZE / 2, IMAGE_SIZE, IMAGE_SIZE)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user