From 5cae286a5b27e9daa88f3fe9e0a22679243119b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sun, 4 Apr 2021 23:40:27 +0200 Subject: [PATCH] MAPG-213 move visibility workaround to Game.showResultMap --- public/static/js/game.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/static/js/game.js b/public/static/js/game.js index cd9685e..e36f7e9 100644 --- a/public/static/js/game.js +++ b/public/static/js/game.js @@ -202,11 +202,6 @@ 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('panoCover').style.visibility = 'visible'; @@ -466,6 +461,11 @@ }, 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) { document.getElementById('guess').classList.remove('adapt'); }