MAPG-35 adapt JS to mobile layout

use null instead of explicit value when reset
This commit is contained in:
Bence Pőcze 2020-05-21 01:59:31 +02:00
parent 4d8ad9f10f
commit cdbcb6ca52

View File

@ -172,6 +172,16 @@
Core.getNewPosition(); Core.getNewPosition();
document.getElementById('showGuessButton').onclick = function () {
this.style.visibility = 'hidden';
document.getElementById('guess').style.visibility = 'visible';
}
document.getElementById('closeGuessButton').onclick = function () {
document.getElementById('showGuessButton').style.visibility = null;
document.getElementById('guess').style.visibility = null;
}
document.getElementById('guessButton').onclick = function () { document.getElementById('guessButton').onclick = function () {
if (!Core.guessMarker) { if (!Core.guessMarker) {
return; return;
@ -231,15 +241,16 @@
} }
document.getElementById('continueButton').onclick = function () { document.getElementById('continueButton').onclick = function () {
document.getElementById('scoreBar').style.width = '0'; document.getElementById('scoreBar').style.width = null;
Core.resultMarkers.real.setMap(null); Core.resultMarkers.real.setMap(null);
Core.resultMarkers.real = null; Core.resultMarkers.real = null;
Core.resultMarkers.guess.setMap(null); Core.resultMarkers.guess.setMap(null);
Core.resultMarkers.guess = null; Core.resultMarkers.guess = null;
document.getElementById('guess').style.visibility = 'visible'; document.getElementById('showGuessButton').style.visibility = null;
document.getElementById('result').style.visibility = 'hidden'; document.getElementById('guess').style.visibility = null;
document.getElementById('result').style.visibility = null;
Core.guessMap.fitBounds(guessMapBounds); Core.guessMap.fitBounds(guessMapBounds);