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

+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();
},