mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-09-28 21:49:06 +02:00
Update main.js
This commit is contained in:
parent
d0ab0ad056
commit
c24791ac43
1 changed files with 27 additions and 0 deletions
|
@ -135,6 +135,33 @@ async function init(){
|
|||
initOverlap();
|
||||
}
|
||||
}
|
||||
|
||||
function changeOverlapMode(){
|
||||
console.log(mode)
|
||||
switch(mode){
|
||||
case "overlap":
|
||||
window.location.href = "?mode=explore"
|
||||
break;
|
||||
case "explore":
|
||||
window.location.href = "?"
|
||||
break;
|
||||
default:
|
||||
window.location.href = "?mode=overlap"
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
const modeMap = {
|
||||
"view": "Overlap",
|
||||
"overlap": "Explore",
|
||||
"explore": "Atlas"
|
||||
}
|
||||
|
||||
const toggleMode = document.getElementById("toggleMode");
|
||||
toggleMode.onclick = changeOverlapMode;
|
||||
toggleMode.innerHTML = modeMap[mode];
|
||||
|
||||
document.getElementById("loading").style.display = "none";
|
||||
|
||||
|
|
Loading…
Reference in a new issue