Add toggleMapView Function for Tutorial Steps

This commit is contained in:
Brenden Harrell committed 2021-05-12 19:28:34 -05:00
1 parent be218752b5
commit 4bcee11574
1 file changed
+16 -1
@@ -131,6 +131,7 @@ function newSuperalgosTutorialSpace() {
}
keyPressed()
toggleMapView()
checkPressButton()
checkGif()
checkImage()
@@ -162,6 +163,20 @@ function newSuperalgosTutorialSpace() {
}
}
function toggleMapView() {
if (currentNode === undefined) { return }
let config = JSON.parse(currentNode.config)
if (
config.toggleMapView !== undefined
) {
if (config.toggleMapView.view === "On") {
UI.projects.superalgos.spaces.floatingSpace.inMapMode = true
} else
if (config.toggleMapView.view === "Off") {
UI.projects.superalgos.spaces.floatingSpace.inMapMode = false
}
}
}
function checkViewportZoom() {
if (currentNode === undefined) { return }
let config = JSON.parse(currentNode.config)
@@ -810,7 +825,7 @@ function newSuperalgosTutorialSpace() {
resetDocumentation()
resetRepositionAtTimeMachine()
resetPositionAtNode()
resetTimeMachineKeyPressed()
resetTimeMachineKeyPressed()
resetKeyPressed()
resetSlider()
changeNodeConfig()