Merge pull request 'MAPG-213 move visibility workaround to Game.showResultMap' (#20) from bugfix/MAPG-213-result-map-not-show-on-mobile-after-reload into develop

Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/20
This commit is contained in:
Bence Pőcze 2021-04-04 23:41:05 +02:00 committed by Gitea
commit a418d5cf66
No known key found for this signature in database
GPG Key ID: 2E27A8C281A1CC2C

View File

@ -202,11 +202,6 @@
return; return;
} }
// TODO: refactor - it is necessary for mobile
if (window.getComputedStyle(document.getElementById('guess')).visibility === 'hidden') {
document.getElementById('showGuessButton').click();
}
document.getElementById('guessButton').disabled = true; document.getElementById('guessButton').disabled = true;
document.getElementById('panoCover').style.visibility = 'visible'; document.getElementById('panoCover').style.visibility = 'visible';
@ -466,6 +461,11 @@
}, },
showResultMap: function (result, resultBounds) { showResultMap: function (result, resultBounds) {
// TODO: refactor - it is necessary for mobile
if (window.getComputedStyle(document.getElementById('guess')).visibility === 'hidden') {
document.getElementById('showGuessButton').click();
}
if (Game.adaptGuess) { if (Game.adaptGuess) {
document.getElementById('guess').classList.remove('adapt'); document.getElementById('guess').classList.remove('adapt');
} }