fullscreen element fix

This commit is contained in:
Matt Walsh 2022-12-14 13:32:55 -06:00
parent 2a577aaea7
commit 806ef91000
4 changed files with 8 additions and 7 deletions

View file

@ -261,9 +261,8 @@ const getDisplay = (index) => displays[index];
// resize the container on a page resize // resize the container on a page resize
const resize = () => { const resize = () => {
const marginOffset = (document.fullscreenElement) ? 0 : 16; const widthZoomPercent = (document.getElementById('divTwcBottom').getBoundingClientRect().width) / 640;
const widthZoomPercent = (window.innerWidth - marginOffset) / 640; const heightZoomPercent = (window.innerHeight) / 480;
const heightZoomPercent = (window.innerHeight - marginOffset) / 480;
const scale = Math.min(widthZoomPercent, heightZoomPercent); const scale = Math.min(widthZoomPercent, heightZoomPercent);
if (scale < 1.0 || document.fullscreenElement) { if (scale < 1.0 || document.fullscreenElement) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -270,9 +270,11 @@ button {
#container { #container {
position: relative; position: relative;
width: 100%; width: 640px;
height: 100%; height: 480px;
overflow: hidden;
background-image: url(../images/BackGround1_1.png); background-image: url(../images/BackGround1_1.png);
} }
#divTwc:fullscreen #container { #divTwc:fullscreen #container {