I would give the id compass to the compass img itself so only the compass graphic would rotate. But then this line should look like this to keep the default translate of the image:
I would give the id `compass` to the compass `img` itself so only the compass graphic would rotate. But then this line should look like this to keep the default translate of the image:
```js
document.getElementById("compass").style.transform = "translateY(-50%) rotate(" + heading + "deg)";
```
So I meant here that this should have the id: <img id="compass" ...
It is not a practical issue but for me it seems to be better if not the whole parent div rotates.
So I meant [here](https://gitea.e5tv.hu/esoko/mapguesser/pulls/27/files#issuecomment-201) that this should have the id: `<img id="compass" ...`
It is not a practical issue but for me it seems to be better if not the whole parent div rotates.
This should be 10px as in the other PR: https://gitea.e5tv.hu/esoko/mapguesser/src/commit/8f0cfd4489f049ee7ced9fcb483bd310d084bfa8/public/static/css/game.css#L211 Otherwise the buttons will be very close to the left side of a mobile device.
Looks good, I had one more finding. But I think #26 can be merged first then the conflicts should solved and this can be also merged. Or what do you prefer, merge the both changes in this PR?
I was too slow again, I see that you merged the other one :D
~~Looks good, I had one more finding. But I think #26 can be merged first then the conflicts should solved and this can be also merged. Or what do you prefer, merge the both changes in this PR?~~
I was too slow again, I see that you merged the other one :D
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Compass
Added a new icon, which shows the direction to north. The direction information is coming from POV heading variable.
@@ -857,1 +864,4 @@Game.rewriteGoogleLink();const heading = Game.panorama.getPov().heading;document.getElementById("compass").style.transform = "rotate(" + heading + "deg)";I would give the id
compassto the compassimgitself so only the compass graphic would rotate. But then this line should look like this to keep the default translate of the image:@@ -62,0 +62,4 @@<div id="navigation"><div id="compass" class="navigationItem"><span><img src="<?= $_ENV['STATIC_ROOT'] ?>/img/circle_background.svg?rev=<?= REVISION ?>" alt="Circle Background" class="circleBackground" />So I meant here that this should have the id:
<img id="compass" ...It is not a practical issue but for me it seems to be better if not the whole parent div rotates.
Most of the changes comes from #26 so I would merge that first. But this new feature really looks cool, it is like our competitor :D
Features Return to Start & In-Game Compassto Feature In-Game Compass@@ -174,1 +208,4 @@}#navigation {bottom: 25px;left: 5px;This should be 10px as in the other PR: https://gitea.e5tv.hu/esoko/mapguesser/src/commit/8f0cfd4489f049ee7ced9fcb483bd310d084bfa8/public/static/css/game.css#L211 Otherwise the buttons will be very close to the left side of a mobile device.
Looks good, I had one more finding. But I think #26 can be merged first then the conflicts should solved and this can be also merged. Or what do you prefer, merge the both changes in this PR?I was too slow again, I see that you merged the other one :D