diff --git a/FloatingSpace/FloatingObject.js b/FloatingSpace/FloatingObject.js index 379e1ff01..925f4e8b6 100644 --- a/FloatingSpace/FloatingObject.js +++ b/FloatingSpace/FloatingObject.js @@ -183,7 +183,7 @@ function newFloatingObject () { let parent = thisObject.payload.chainParent if (parent !== undefined) { let distanceToChainParent = Math.sqrt(Math.pow(parent.payload.position.x - thisObject.container.frame.position.x, 2) + Math.pow(parent.payload.position.y - thisObject.container.frame.position.y, 2)) // ... we calculate the distance ... - let parentChildren = canvas.strategySpace.workspace.nodeChildren.childrenCount(parent) + let parentChildren = canvas.strategySpace.workspace.nodeChildren.childrenCount(parent, thisObject.payload.node) let axisCount = parentChildren.childrenCount let axisIndex = parentChildren.childIndex diff --git a/StrategySpace/Workspace/FunctionLibraries/NodeChildren.js b/StrategySpace/Workspace/FunctionLibraries/NodeChildren.js index 1749c3148..d346f8a82 100644 --- a/StrategySpace/Workspace/FunctionLibraries/NodeChildren.js +++ b/StrategySpace/Workspace/FunctionLibraries/NodeChildren.js @@ -38,7 +38,16 @@ function newNodeChildren () { case 'Initial Definition': { return countChildrenInitialDefinition(parentNode, childNode) } - case 'Event': { + case 'Next Phase Event': { + return countChildrenEvent(parentNode, childNode) + } + case 'Trigger On Event': { + return countChildrenEvent(parentNode, childNode) + } + case 'Trigger Off Event': { + return countChildrenEvent(parentNode, childNode) + } + case 'Take Position Event': { return countChildrenEvent(parentNode, childNode) } case 'Stop': {