diff --git a/Spaces/TutorialSpace.js b/Spaces/TutorialSpace.js
index e9e2bdc8e..3ce4d4526 100644
--- a/Spaces/TutorialSpace.js
+++ b/Spaces/TutorialSpace.js
@@ -324,21 +324,21 @@ function newTutorialSpace() {
currentNode = previousNode
findTutorialNode(currentNode)
currentStatus = 'Playing Tutorial'
- navigationStack.splice(navigationStack.length - 1)
+ navigationStack.splice(navigationStack.length - 1)
break
}
case 'Tutorial Topic': {
currentNode = previousNode
findTutorialNode(currentNode)
currentStatus = 'Playing Topic'
- navigationStack.splice(navigationStack.length - 1)
+ navigationStack.splice(navigationStack.length - 1)
break
}
case 'Tutorial Step': {
currentNode = previousNode
findTutorialNode(currentNode)
currentStatus = 'Playing Step'
- navigationStack.splice(navigationStack.length - 1)
+ navigationStack.splice(navigationStack.length - 1)
break
}
}
@@ -597,7 +597,7 @@ function newTutorialSpace() {
}
html = html + '
'
if (nodeConfig.summary !== undefined && nodeConfig.summary !== '') {
- html = html + '
' + nodeConfig.summary + '
'
+ html = html + '
' + addToolTips(nodeConfig.summary) + '
'
}
if (nodeConfig.subTitle !== undefined && nodeConfig.subTitle !== '') {
html = html + '
' + nodeConfig.subTitle + '
'
@@ -606,6 +606,7 @@ function newTutorialSpace() {
html = html + '
'
newGifName = nodeConfig.gif
}
+
if (nodeConfig.definition !== undefined && nodeConfig.definition !== '') {
html = html + '
'
html = html + ''
@@ -616,52 +617,67 @@ function newTutorialSpace() {
}
html = html + ''
html = html + '| '
- html = html + '' + nodeConfig.definition + ''
+ html = html + '' + addToolTips(nodeConfig.definition) + ''
html = html + ' | '
html = html + '
'
html = html + '
'
}
if (nodeConfig.bulletListIntro !== undefined && nodeConfig.bulletListIntro !== '') {
- html = html + '
' + nodeConfig.bulletListIntro + '
'
+ html = html + '
' + addToolTips(nodeConfig.bulletListIntro) + '
'
}
if (nodeConfig.bulletArray !== undefined) {
html = html + '
'
}
if (nodeConfig.paragraph1 !== undefined && nodeConfig.paragraph1 !== '') {
- html = html + '
' + nodeConfig.paragraph1 + '
'
+ html = html + '
' + addToolTips(nodeConfig.paragraph1) + '
'
}
if (nodeConfig.callOut !== undefined && nodeConfig.callOut !== '') {
- html = html + '
' + nodeConfig.callOut + ''
+ html = html + '
'
}
if (nodeConfig.paragraph2 !== undefined && nodeConfig.paragraph2 !== '') {
- html = html + '
' + nodeConfig.paragraph2 + '
'
+ html = html + '
' + addToolTips(nodeConfig.paragraph2) + '
'
}
if (nodeConfig.note !== undefined && nodeConfig.note !== '') {
- html = html + '
Note: ' + nodeConfig.note + '
'
+ html = html + '
Note: ' + addToolTips(nodeConfig.note) + '
'
}
if (nodeConfig.tip !== undefined && nodeConfig.tip !== '') {
- html = html + '
Tip: ' + nodeConfig.tip + '
'
+ html = html + '
Tip: ' + addToolTips(nodeConfig.tip) + '
'
}
if (nodeConfig.important !== undefined && nodeConfig.important !== '') {
- html = html + '
Important: ' + nodeConfig.important + '
'
+ html = html + '
Important: ' + addToolTips(nodeConfig.important) + '
'
}
if (nodeConfig.warning !== undefined && nodeConfig.warning !== '') {
- html = html + '
Important: ' + nodeConfig.warning + '
'
+ html = html + '
Important: ' + addToolTips(nodeConfig.warning) + '
'
}
html = html + '
'
tutorialDiv.innerHTML = html
+
+ function addToolTips(text) {
+ const TOOL_TIP_HTML = '
NODE_TYPENODE_DEFINITION
'
+ let resultingText = ''
+ let splittedText = text.split('->')
+
+ for (let i = 0; i < splittedText.length; i = i + 2) {
+ let firstPart = splittedText[i]
+ let nodeType = splittedText[i + 1]
+ if (nodeType === undefined ) {return resultingText + firstPart}
+ let tooltip = TOOL_TIP_HTML.replace('NODE_TYPE', nodeType).replace('NODE_DEFINITION', 'La concha del mono, lo logre!')
+ resultingText = resultingText + firstPart + tooltip
+ }
+ return resultingText
+ }
}
function draw() {