added compass button and coupled its transform:rotate style attribute with the POV heading value

This commit is contained in:
balazs committed 2021-04-28 20:33:17 +02:00
1 parent 3d52c967b6
commit e33d8c02e9
3 files changed
+20

No files matched your search

+7
View File
@@ -382,6 +382,10 @@
// needs to be set visible after the show guess map hid it in mobile view
document.getElementById("navigation").style.visibility = 'visible';
// update the compass
const heading = Game.panorama.getPov().heading;
document.getElementById("compass").style.transform = "rotate(" + heading + "deg)";
},
handleErrorResponse: function (error) {
@@ -858,6 +862,9 @@
Game.panorama.addListener('pov_changed', function () {
Game.rewriteGoogleLink();
const heading = Game.panorama.getPov().heading;
document.getElementById("compass").style.transform = "rotate(" + heading + "deg)";
});
if (COOKIES_CONSENT) {