diff --git a/CanvasApp/Spaces/TutorialSpace.js b/CanvasApp/Spaces/TutorialSpace.js index 56e1d5bcc..0ea651583 100644 --- a/CanvasApp/Spaces/TutorialSpace.js +++ b/CanvasApp/Spaces/TutorialSpace.js @@ -61,6 +61,7 @@ function newTutorialSpace() { let timeMachineKeyPressedCounter = 0 let keyPressedCounter = 0 let sliderPositioned = 0 + let changeNodeConfigCounter = 0 return thisObject @@ -407,6 +408,18 @@ function newTutorialSpace() { currentNode.payload.referenceParent.payload.floatingObject.forceFocus() forcingFocus = true } + if ( + config.changeNodeConfigReferenceParent !== undefined + ) { + changeNodeConfigCounter++ + if (changeNodeConfigCounter === 5) { + let nodeConfig = JSON.parse(currentNode.payload.referenceParent.config) + for (const property in config.changeNodeConfigReferenceParent) { + nodeConfig[property] = config.changeNodeConfigReferenceParent[property] + } + currentNode.payload.referenceParent.config = JSON.stringify(nodeConfig) + } + } if ( config.menuActionReferenceParent !== undefined ) { @@ -638,6 +651,7 @@ function newTutorialSpace() { resetTimeMachineKeyPressed() resetKeyPressed() resetSlider() + changeNodeConfig() function resetActions() { lastExecutedAction = "" @@ -672,6 +686,10 @@ function newTutorialSpace() { function resetSlider() { sliderPositioned = false } + + function changeNodeConfig() { + changeNodeConfigCounter = 0 + } } function checkForceFocus() {