Zindex top controls so at least the firefox bug doesn't stop them from being used.
Added in button to hit first if query params are used so modern browsers dont freak out about audio.
This commit is contained in:
parent
d101cd9ff0
commit
4e982cdd3d
@ -102,7 +102,7 @@ body { margin: 0; }
|
|||||||
|
|
||||||
#title-container { margin-bottom: 2px; }
|
#title-container { margin-bottom: 2px; }
|
||||||
|
|
||||||
#other-controls-container { display: flex; width: 550px; justify-content: center; }
|
#other-controls-container { display: flex; width: 550px; justify-content: center; z-index: 10; }
|
||||||
|
|
||||||
#select-mission { min-width: 0; }
|
#select-mission { min-width: 0; }
|
||||||
|
|
||||||
|
13
Js/Main.js
13
Js/Main.js
@ -71,9 +71,6 @@ function onAllLoaded(success) {
|
|||||||
onWindowResize();
|
onWindowResize();
|
||||||
window.addEventListener("resize", onWindowResize);
|
window.addEventListener("resize", onWindowResize);
|
||||||
checkQueryParameters();
|
checkQueryParameters();
|
||||||
//Firefox52 hack for weird sizing thing.
|
|
||||||
document.body.style.zoom = 1.0000001;
|
|
||||||
setTimeout(function(){document.body.style.zoom = 1;},50);
|
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,10 +150,15 @@ function buildLanguageList() {
|
|||||||
function checkQueryParameters() {
|
function checkQueryParameters() {
|
||||||
urlParams = commonFunctions.readQueryParameters();
|
urlParams = commonFunctions.readQueryParameters();
|
||||||
if(urlParams['mstid'] && urlParams['id'] && utage.groupedMissions[urlParams['mstid']] && utage.groupedMissions[urlParams['mstid']].Missions[urlParams['id']]) {
|
if(urlParams['mstid'] && urlParams['id'] && utage.groupedMissions[urlParams['mstid']] && utage.groupedMissions[urlParams['mstid']].Missions[urlParams['id']]) {
|
||||||
missionChanged(urlParams['mstid'], urlParams['id']);
|
document.getElementById('play-from-query').style.cssText = "position: fixed; z-index: 15; text-align: center; top: 50%; left: 50%; display: block;";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function playFromQuery(event) {
|
||||||
|
missionChanged(urlParams['mstid'], urlParams['id']);
|
||||||
|
document.getElementById('play-from-query').style.cssText = "display: none;";
|
||||||
|
}
|
||||||
|
|
||||||
function missionDropDownChanged(event) {
|
function missionDropDownChanged(event) {
|
||||||
if(!event || !event.currentTarget || !event.currentTarget.value || event.currentTarget.value === '{Select}') { return; }
|
if(!event || !event.currentTarget || !event.currentTarget.value || event.currentTarget.value === '{Select}') { return; }
|
||||||
let cont = document.getElementById("modal-container");
|
let cont = document.getElementById("modal-container");
|
||||||
@ -358,8 +360,5 @@ function onWindowResize(event) {
|
|||||||
let res = commonFunctions.getNewResolution(baseDimensions, screenw, screenh, topContainerHeight);
|
let res = commonFunctions.getNewResolution(baseDimensions, screenw, screenh, topContainerHeight);
|
||||||
player.updateResolution(res);
|
player.updateResolution(res);
|
||||||
document.getElementById('app-container').style.cssText = `width: ${res.width}px; height: ${res.height}px;`;
|
document.getElementById('app-container').style.cssText = `width: ${res.width}px; height: ${res.height}px;`;
|
||||||
//Firefox52 hack for weird sizing thing.
|
|
||||||
document.body.style.zoom = 1.0000001;
|
|
||||||
setTimeout(function(){document.body.style.zoom = 1;},50);
|
|
||||||
}, 400);
|
}, 400);
|
||||||
}
|
}
|
@ -34,6 +34,7 @@
|
|||||||
<div id="app-container" onclick="onMainClick(event);">
|
<div id="app-container" onclick="onMainClick(event);">
|
||||||
<div id="text-container">
|
<div id="text-container">
|
||||||
<img id="main-ui-img" class="hidden" src="Images/newui_main.png"/>
|
<img id="main-ui-img" class="hidden" src="Images/newui_main.png"/>
|
||||||
|
<button id="play-from-query" onclick="playFromQuery(event)" style="display: none;">Play</button>
|
||||||
<div id="title" class="hidden">Title Text</div>
|
<div id="title" class="hidden">Title Text</div>
|
||||||
<div id="diva" class="hidden">Diva Text</div>
|
<div id="diva" class="hidden">Diva Text</div>
|
||||||
<div id="dialog-box" class="hidden">
|
<div id="dialog-box" class="hidden">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user