From f8e81c5e3aa6d132b15b5149557737c666b7eea2 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 18 Sep 2020 15:31:08 +0200 Subject: [PATCH] Update TutorialSpace.js --- Spaces/TutorialSpace.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Spaces/TutorialSpace.js b/Spaces/TutorialSpace.js index e21a2eebd..76863cd51 100644 --- a/Spaces/TutorialSpace.js +++ b/Spaces/TutorialSpace.js @@ -328,6 +328,7 @@ function newTutorialSpace() { } function done() { + if (ckeckGoingToAnotherTutorial() === true ) {return} let tutorial = { status: 'Done' } @@ -335,6 +336,16 @@ function newTutorialSpace() { advance() } + function ckeckGoingToAnotherTutorial() { + if (currentNode.payload !== undefined) { + if (currentNode.payload.referenceParent !== undefined) { + if (currentNode.payload.referenceParent.type === 'Tutorial') { + playTutorial(currentNode.payload.referenceParent) + } + } + } + } + function playTutorialTopic(node) { currentTopicNode = node currentNode = node @@ -446,7 +457,6 @@ function newTutorialSpace() { } function findNextNode(node) { - for (let i = 0; i < node.tutorialSteps.length; i++) { let tutorialStep = node.tutorialSteps[i] @@ -519,6 +529,10 @@ function newTutorialSpace() { let html = '' if (nodeConfig.title !== undefined && nodeConfig.title !== '') { html = html + '

' + nodeConfig.title + '

' + } else { + if (currentNode.name !== 'New ' + currentNode.type) { + html = html + '

' + currentNode.name + '

' + } } html = html + '
' if (nodeConfig.summary !== undefined && nodeConfig.summary !== '') { @@ -554,7 +568,7 @@ function newTutorialSpace() { for (let i = 0; i < nodeConfig.bulletArray.length; i++) { let bullet = nodeConfig.bulletArray[i] html = html + '
  • ' - html = html + '

    ' + bullet[0] + ': ' + bullet[1] + '

    ' + html = html + '

    ' + bullet[0] + ' ' + bullet[1] + '

    ' html = html + '
  • ' } html = html + ''