From 4e982cdd3de7d0db04e709906ee9b51d85e58609 Mon Sep 17 00:00:00 2001 From: firebingo Date: Wed, 23 May 2018 22:22:40 -0700 Subject: [PATCH] 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. --- Css/main.css | 2 +- Js/Main.js | 13 ++++++------- Player.html | 1 + 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Css/main.css b/Css/main.css index 0a80c0d..5d09967 100644 --- a/Css/main.css +++ b/Css/main.css @@ -102,7 +102,7 @@ body { margin: 0; } #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; } diff --git a/Js/Main.js b/Js/Main.js index 1e9b42d..f619a85 100644 --- a/Js/Main.js +++ b/Js/Main.js @@ -71,9 +71,6 @@ function onAllLoaded(success) { onWindowResize(); window.addEventListener("resize", onWindowResize); checkQueryParameters(); - //Firefox52 hack for weird sizing thing. - document.body.style.zoom = 1.0000001; - setTimeout(function(){document.body.style.zoom = 1;},50); }, 0); } @@ -153,10 +150,15 @@ function buildLanguageList() { function checkQueryParameters() { urlParams = commonFunctions.readQueryParameters(); 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) { if(!event || !event.currentTarget || !event.currentTarget.value || event.currentTarget.value === '{Select}') { return; } let cont = document.getElementById("modal-container"); @@ -358,8 +360,5 @@ function onWindowResize(event) { let res = commonFunctions.getNewResolution(baseDimensions, screenw, screenh, topContainerHeight); player.updateResolution(res); 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); } \ No newline at end of file diff --git a/Player.html b/Player.html index 9ea148a..c90abf8 100644 --- a/Player.html +++ b/Player.html @@ -34,6 +34,7 @@
+