MAPG-64 create cover div when user should not click on the pano or guess map

add loading animation to maps page too
CSS fixes
This commit is contained in:
bence committed 2020-05-30 20:13:00 +02:00
1 parent 8a433abe9f
commit 88a1d5ab8e
4 files changed
+53 -16

No files matched your search

+6
View File
@@ -16,6 +16,7 @@
initialize: function () {
document.getElementById('loading').style.visibility = 'visible';
document.getElementById('cover').style.visibility = 'visible';
document.getElementById('currentRound').innerHTML = '1/' + String(Core.NUMBER_OF_ROUNDS);
document.getElementById('currentScoreSum').innerHTML = '0/0';
@@ -33,6 +34,7 @@
}
document.getElementById('loading').style.visibility = 'hidden';
document.getElementById('cover').style.visibility = 'hidden';
Core.panoId = this.response.panoId;
@@ -101,6 +103,7 @@
lastRound.line.setVisible(false);
}
document.getElementById('cover').style.visibility = 'hidden';
document.getElementById('showGuessButton').style.visibility = null;
document.getElementById('guess').style.visibility = null;
document.getElementById('guess').classList.remove('result')
@@ -154,6 +157,7 @@
document.getElementById('guess').classList.remove('adapt');
}
document.getElementById('loading').style.visibility = 'visible';
document.getElementById('cover').style.visibility = 'visible';
var data = new FormData();
data.append('guess', '1');
@@ -443,6 +447,8 @@
Core.resetGame();
}
// showing the loading animation is not possible, because we don't know if user cancelled the leave
window.onbeforeunload = function (e) {
if (Core.rounds[Core.rounds.length - 1].position) {
return;