From f7790d593b93f6a7798c0bcd1a9f90b7151cfc4e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 5 Oct 2020 13:34:46 +0200 Subject: [PATCH] Update TutorialSpace.js --- Spaces/TutorialSpace.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Spaces/TutorialSpace.js b/Spaces/TutorialSpace.js index 76c290158..698628223 100644 --- a/Spaces/TutorialSpace.js +++ b/Spaces/TutorialSpace.js @@ -62,6 +62,7 @@ function newTutorialSpace() { let keyPressedCounter = 0 let sliderPositioned = 0 let changeNodeConfigCounter = 0 + let changeNodeConfigCounterWithEval = 0 let documentationCounter = 0 let batchConfigChangesCounter = 0 @@ -483,6 +484,18 @@ function newTutorialSpace() { currentNode.payload.referenceParent.config = JSON.stringify(nodeConfig) } } + if ( + config.changeNodeConfigWithEvalReferenceParent !== undefined + ) { + changeNodeConfigCounterWithEval++ + if (changeNodeConfigCounterWithEval === 5) { + let nodeConfig = JSON.parse(currentNode.payload.referenceParent.config) + for (const property in config.changeNodeConfigWithEvalReferenceParent) { + nodeConfig[property] = eval(config.changeNodeConfigWithEvalReferenceParent[property]) + } + currentNode.payload.referenceParent.config = JSON.stringify(nodeConfig) + } + } if ( config.menuActionReferenceParent !== undefined ) { @@ -783,6 +796,7 @@ function newTutorialSpace() { function changeNodeConfig() { changeNodeConfigCounter = 0 + changeNodeConfigCounterWithEval = 0 } function batchConfigChanges() {