Update TutorialSpace.js
This commit is contained in:
1 parent
549b973217
commit
2af6d7f8c1
1 file changed
+22
@@ -39,6 +39,9 @@ function newTutorialSpace() {
|
||||
|
||||
let tutorialDiv = document.getElementById('tutorialDiv')
|
||||
let tutorialFormDiv = document.getElementById('tutorialFormDiv')
|
||||
let htmlGif = document.createElement("IMG")
|
||||
let currentGifName = 'Never Set'
|
||||
let newGifName = 'Never Set'
|
||||
let htmlImage = document.createElement("IMG")
|
||||
let currentImageName = 'Never Set'
|
||||
let newImageName = 'Never Set'
|
||||
@@ -64,6 +67,7 @@ function newTutorialSpace() {
|
||||
tutorialDiv = undefined
|
||||
tutorialFormDiv = undefined
|
||||
image = undefined
|
||||
gif = undefined
|
||||
}
|
||||
|
||||
function resize() {
|
||||
@@ -104,11 +108,25 @@ function newTutorialSpace() {
|
||||
}
|
||||
}
|
||||
|
||||
checkGif()
|
||||
checkImage()
|
||||
checkDocumentation()
|
||||
checkReference()
|
||||
return
|
||||
|
||||
function checkGif() {
|
||||
let tutorialGifDiv = document.getElementById('tutorialGifDiv')
|
||||
if (tutorialGifDiv !== null && tutorialGifDiv !== undefined) {
|
||||
tutorialGifDiv.appendChild(htmlGif)
|
||||
}
|
||||
|
||||
if (currentGifName === newGifName) { return }
|
||||
currentGifName = newGifName
|
||||
htmlGif.src = 'Images/Tutorial/Gifs/' + currentGifName + '.gif'
|
||||
htmlGif.width = "400"
|
||||
//htmlGif.height = "100"
|
||||
}
|
||||
|
||||
function checkImage() {
|
||||
let tutorialImageDiv = document.getElementById('tutorialImageDiv')
|
||||
if (tutorialImageDiv !== null && tutorialImageDiv !== undefined) {
|
||||
@@ -463,6 +481,10 @@ function newTutorialSpace() {
|
||||
if (nodeConfig.subTitle !== undefined && nodeConfig.subTitle !== '') {
|
||||
html = html + '<h2 class="tutorial-saira-medium">' + nodeConfig.subTitle + '</h2>'
|
||||
}
|
||||
if (nodeConfig.gif !== undefined && nodeConfig.gif !== '') {
|
||||
html = html + '<div id="tutorialGifDiv" width="400"/>'
|
||||
newGifName = nodeConfig.gif
|
||||
}
|
||||
if (nodeConfig.definition !== undefined && nodeConfig.definition !== '') {
|
||||
html = html + '<table class="tutorial-definitionTable">'
|
||||
html = html + '<tr>'
|
||||
|
||||
Reference in new issue
Block a user