only the image is rotated, not the whole div
All checks were successful
default-pipeline default-pipeline #141

This commit is contained in:
Balázs Vigh 2021-04-29 09:18:24 +02:00
parent 0739c65961
commit d42280eb10
2 changed files with 4 additions and 4 deletions

View File

@ -388,7 +388,7 @@
// update the compass // update the compass
const heading = Game.panorama.getPov().heading; const heading = Game.panorama.getPov().heading;
document.getElementById("compass").style.transform = "rotate(" + heading + "deg)"; document.getElementById("compass").style.transform = "translateY(-50%) rotate(" + heading + "deg)";
}, },
handleErrorResponse: function (error) { handleErrorResponse: function (error) {
@ -867,7 +867,7 @@
Game.rewriteGoogleLink(); Game.rewriteGoogleLink();
const heading = Game.panorama.getPov().heading; const heading = Game.panorama.getPov().heading;
document.getElementById("compass").style.transform = "rotate(" + heading + "deg)"; document.getElementById("compass").style.transform = "translateY(-50%) rotate(" + heading + "deg)";
}); });
if (COOKIES_CONSENT) { if (COOKIES_CONSENT) {

View File

@ -60,12 +60,12 @@
</div> </div>
</div> </div>
<div id="navigation"> <div id="navigation">
<div id="compass" class="navigationItem"> <div class="navigationItem">
<span> <span>
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/circle_background.svg?rev=<?= REVISION ?>" alt="Circle Background" class="circleBackground" /> <img src="<?= $_ENV['STATIC_ROOT'] ?>/img/circle_background.svg?rev=<?= REVISION ?>" alt="Circle Background" class="circleBackground" />
</span> </span>
<span> <span>
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/compass.svg?rev=<?= REVISION ?>" alt="compass icon" class="navigationIcon" /> <img id="compass" src="<?= $_ENV['STATIC_ROOT'] ?>/img/compass.svg?rev=<?= REVISION ?>" alt="compass icon" class="navigationIcon" />
</span> </span>
</div> </div>
<div id="returnToStart" class="navigationItem"> <div id="returnToStart" class="navigationItem">