mobile scaling and rotation

This commit is contained in:
Matt Walsh
2022-12-09 13:11:53 -06:00
parent 1cf9f41ca0
commit 6a1e2da11e
5 changed files with 7 additions and 7 deletions

View File

@@ -252,11 +252,11 @@ const getDisplay = (index) => displays[index];
// resize the container on a page resize
const resize = () => {
const widthZoomPercent = window.innerWidth / 640;
const heightZoomPercent = window.innerHeight / 480;
const widthZoomPercent = document.body.clientWidth / 640;
const heightZoomPercent = document.body.clientHeight / 480;
const scale = Math.min(widthZoomPercent, heightZoomPercent);
console.log(scale, document.body.clientWidth);
if (scale < 1.0 || document.fullscreenElement) {
document.getElementById('container').style.zoom = scale;
} else {