add images and widescreen cleanup close #32
This commit is contained in:
parent
0eb4a1ffc7
commit
bf8bd2ff46
13 changed files with 160 additions and 20 deletions
|
|
@ -4,6 +4,7 @@ import STATUS from './status.mjs';
|
|||
import { wrap } from './utils/calc.mjs';
|
||||
import { json } from './utils/fetch.mjs';
|
||||
import { getPoint } from './utils/weather.mjs';
|
||||
import settings from './settings.mjs';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
init();
|
||||
|
|
@ -269,7 +270,8 @@ const getDisplay = (index) => displays[index];
|
|||
|
||||
// resize the container on a page resize
|
||||
const resize = () => {
|
||||
const widthZoomPercent = (document.querySelector('#divTwcBottom').getBoundingClientRect().width) / 640;
|
||||
const targetWidth = settings.wide.value ? 640 + 107 + 107 : 640;
|
||||
const widthZoomPercent = (document.querySelector('#divTwcBottom').getBoundingClientRect().width) / targetWidth;
|
||||
const heightZoomPercent = (window.innerHeight) / 480;
|
||||
|
||||
const scale = Math.min(widthZoomPercent, heightZoomPercent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue