diff --git a/server/scripts/modules/currentweather.mjs b/server/scripts/modules/currentweather.mjs index f3f4cd8..8116226 100644 --- a/server/scripts/modules/currentweather.mjs +++ b/server/scripts/modules/currentweather.mjs @@ -128,7 +128,7 @@ class CurrentWeather extends WeatherDisplay { let Conditions = data.observations.textDescription; if (Conditions.length > 15) { - Conditions = this.shortConditions(Conditions); + Conditions = CurrentWeather.shortConditions(Conditions); } fill.condition = Conditions; diff --git a/server/scripts/modules/navigation.mjs b/server/scripts/modules/navigation.mjs index 2b64711..57cd6a3 100644 --- a/server/scripts/modules/navigation.mjs +++ b/server/scripts/modules/navigation.mjs @@ -252,11 +252,11 @@ const getDisplay = (index) => displays[index]; // resize the container on a page resize const resize = () => { - const widthZoomPercent = document.body.clientWidth / 640; - const heightZoomPercent = document.body.clientHeight / 480; + const marginOffset = (document.fullscreenElement) ? 0 : 16; + const widthZoomPercent = (window.innerWidth - marginOffset) / 640; + const heightZoomPercent = (window.innerHeight - marginOffset) / 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 {