MAPG-235 noMove, noZoom, noPan restrictions implemented

This commit is contained in:
balazs committed 2021-05-19 21:16:59 +02:00
1 parent 77ff175794
commit 3b98570f6d
6 files changed
+44 -7

No files matched your search

+12 -1
View File
@@ -15,6 +15,17 @@
right: 0;
background-color: #000000;
opacity: 0.5;
z-index: 4;
}
#panningBlockerCover {
display: none;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
opacity: 0;
z-index: 3;
}
@@ -22,7 +33,7 @@
position: absolute;
bottom: 30px;
right: 20px;
z-index: 2;
z-index: 3;
}
#guess.result {
+1
View File
@@ -77,6 +77,7 @@ div.mapItem>div.buttonContainer {
#restrictions {
margin-top: 1em;
margin-bottom: 1em;
font-family: 'Roboto', sans-serif;
}
+19 -2
View File
@@ -301,11 +301,21 @@ const GameType = Object.freeze({ 'SINGLE': 0, 'MULTI': 1, 'CHALLENGE': 2 });
Game.transitToResultMap();
Game.showSummary();
//document.getElementById('continueButton').style.display = 'none';
} else {
if (this.response.restrictions) {
Game.panorama.setOptions({
clickToGo: !this.response.restrictions.noMove,
linksControl: !this.response.restrictions.noMove,
scrollwheel: !this.response.restrictions.noZoom
});
if (this.response.restrictions.noPan) {
document.getElementById('panningBlockerCover').style.display = 'block';
}
}
Game.panoId = this.response.place.panoId;
Game.pov = this.response.place.pov;
@@ -442,6 +452,13 @@ const GameType = Object.freeze({ 'SINGLE': 0, 'MULTI': 1, 'CHALLENGE': 2 });
// needs to be set visible after the show guess map hid it in mobile view
document.getElementById("navigation").style.visibility = 'visible';
Game.panorama.setOptions({
clickToGo: true,
linksControl: true,
scrollwheel: true
});
document.getElementById('panningBlockerCover').style.display = null;
Game.initialize();
},