mobile scaling and rotation
This commit is contained in:
parent
1cf9f41ca0
commit
6a1e2da11e
|
@ -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 {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -31,6 +31,7 @@ button {
|
|||
#txtAddress {
|
||||
width: 490px;
|
||||
font-size: 16pt;
|
||||
max-width: calc(100% - 8px);
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
background-color: #000000;
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
<meta name="keywords" content="WeatherStar 4000+" />
|
||||
<meta name="author" content="Matt Walsh" />
|
||||
<meta name="application-name" content="WeatherStar 4000+" />
|
||||
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1;maximum-scale=1;minimum-scale=1">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<link rel="manifest" href="manifest.json" />
|
||||
|
|
Loading…
Reference in a new issue