feature/return-to-starting-point-button #26
@ -157,13 +157,14 @@
|
||||
#navigation .navigationItem {
|
||||
margin-top: 10px;
|
||||
opacity: 70%;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
#navigation .navigationItem:hover {
|
||||
opacity: 100%;
|
||||
}
|
||||
|
||||
bence
commented
For semantical reasons I would use
For semantical reasons I would use `div` instead of `span` because `span` is intended to be an inline element, however this a block element here.
```css
#navigation .navigationItem div {
```
balazs
commented
I don't know why, but it breaks the visualization. I didn't see any difference in the CSS tree, when I tried it. I don't know why, but it breaks the visualization. I didn't see any difference in the CSS tree, when I tried it.
balazs
commented
I've realized I've left out the .navigationItem and that's why not the right div was selected. (I see now, that you wrote it correctly in your suggestion) I've realized I've left out the .navigationItem and that's why not the right div was selected. (I see now, that you wrote it correctly in your suggestion)
|
||||
#navigation span {
|
||||
#navigation div {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@ -188,9 +189,9 @@
|
||||
}
|
||||
#showGuessButtonContainer {
|
||||
position: absolute;
|
||||
bence
commented
I would modify this as follows:
Then only I would modify this as follows:
```css
left: 65px;
```
```css
right: 20px;
```
Then only `left` would change to leave space for the return to start button (and it would have a slightly bigger space).
![](https://i.ibb.co/7VRQz3Q/Bildschirmfoto-vom-2021-04-29-00-10-55.png)
balazs
commented
I didn't want to break the symmetry, and I was thinking putting buttons to the right as well. But if you prefer the button to be larger over the symmetry, it's fine by me. I didn't want to break the symmetry, and I was thinking putting buttons to the right as well. But if you prefer the button to be larger over the symmetry, it's fine by me.
bence
commented
If further buttons are planned, it is OK for me. If further buttons are planned, it is OK for me.
bence
commented
However I see you already changed the position, then I wouldn't change back. However I see you already changed the position, then I wouldn't change back.
|
||||
left: 60px;
|
||||
left: 65px;
|
||||
bottom: 30px;
|
||||
right: 60px;
|
||||
right: 20px;
|
||||
z-index: 2;
|
||||
}
|
||||
#guess {
|
||||
|
@ -334,6 +334,9 @@
|
||||
document.getElementById('guess').style.visibility = null;
|
||||
document.getElementById('guess').classList.remove('result');
|
||||
|
||||
// needs to be set visible after the show guess map hid it in mobile view
|
||||
document.getElementById("navigation").style.visibility = 'visible';
|
||||
|
||||
Game.initialize();
|
||||
},
|
||||
|
||||
@ -379,9 +382,6 @@
|
||||
document.getElementById('currentRound').innerHTML = String(Game.rounds.length) + '/' + String(Game.NUMBER_OF_ROUNDS);
|
||||
|
||||
Game.loadPano(Game.panoId, Game.pov);
|
||||
bence
commented
This semantically belongs to This semantically belongs to `reset` (after line 334) and `resetRound` (after line 360). Yes it will be some ugly code duplication but easier to find there and I plan to refactor this JS in the future.
|
||||
|
||||
// needs to be set visible after the show guess map hid it in mobile view
|
||||
document.getElementById("navigation").style.visibility = 'visible';
|
||||
},
|
||||
|
||||
handleErrorResponse: function (error) {
|
||||
|
@ -61,12 +61,12 @@
|
||||
</div>
|
||||
<div id="navigation">
|
||||
<div id="returnToStart" class="navigationItem">
|
||||
<span>
|
||||
<div>
|
||||
bence
commented
[https://gitea.e5tv.hu/esoko/mapguesser/pulls/26/files#issuecomment-197](https://gitea.e5tv.hu/esoko/mapguesser/pulls/26/files#issuecomment-197)
```html
<div>
```
|
||||
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/circle_background.svg?rev=<?= REVISION ?>" alt="Circle Background" class="circleBackground" />
|
||||
</span>
|
||||
<span>
|
||||
</div>
|
||||
<div>
|
||||
<img src="<?= $_ENV['STATIC_ROOT'] ?>/img/house-fill.svg?rev=<?= REVISION ?>" alt="Return to Start icon" class="navigationIcon" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
Then it will feel like a link.