From 1528e52fb17242a61ac42da85fec65ae0cf15115 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 18 Oct 2019 17:25:40 +0200 Subject: [PATCH] Update NodeChildren.js --- .../FunctionLibraries/NodeChildren.js | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/StrategySpace/Workspace/FunctionLibraries/NodeChildren.js b/StrategySpace/Workspace/FunctionLibraries/NodeChildren.js index a776a8d7d..3bce0a287 100644 --- a/StrategySpace/Workspace/FunctionLibraries/NodeChildren.js +++ b/StrategySpace/Workspace/FunctionLibraries/NodeChildren.js @@ -397,6 +397,12 @@ function newNodeChildren () { response.childIndex = response.childrenCount } } + if (parentNode.socialBots !== undefined) { + response.childrenCount++ + if (parentNode.socialBots.id === childNode.id) { + response.childIndex = response.childrenCount + } + } return response } @@ -417,6 +423,12 @@ function newNodeChildren () { response.childIndex = response.childrenCount } } + if (parentNode.socialBots !== undefined) { + response.childrenCount++ + if (parentNode.socialBots.id === childNode.id) { + response.childIndex = response.childrenCount + } + } return response } @@ -437,6 +449,12 @@ function newNodeChildren () { response.childIndex = response.childrenCount } } + if (parentNode.socialBots !== undefined) { + response.childrenCount++ + if (parentNode.socialBots.id === childNode.id) { + response.childIndex = response.childrenCount + } + } return response } @@ -457,6 +475,12 @@ function newNodeChildren () { response.childIndex = response.childrenCount } } + if (parentNode.socialBots !== undefined) { + response.childrenCount++ + if (parentNode.socialBots.id === childNode.id) { + response.childIndex = response.childrenCount + } + } return response } @@ -823,6 +847,13 @@ function newNodeChildren () { response.childIndex = response.childrenCount } } + for (let i = 0; i < parentNode.announcements.length; i++) { + let child = parentNode.announcements[i] + response.childrenCount++ + if (child.id === childNode.id) { + response.childIndex = response.childrenCount + } + } return response }