mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 00:59:29 -07:00
nav, header and map image cleanup
This commit is contained in:
@@ -10,7 +10,7 @@ class Almanac extends WeatherDisplay {
|
||||
super(navId, elemId, 'Almanac', true);
|
||||
|
||||
// pre-load background images (returns promises)
|
||||
this.backgroundImage0 = loadImg('images/BackGround3_1.png');
|
||||
this.backgroundImage0 = loadImg('images/backgrounds/1.png');
|
||||
|
||||
// preload the moon images
|
||||
preloadImg('images/2/Full-Moon.gif');
|
||||
|
||||
@@ -18,7 +18,7 @@ class CurrentWeather extends WeatherDisplay {
|
||||
constructor(navId, elemId) {
|
||||
super(navId, elemId, 'Current Conditions', true);
|
||||
// pre-load background image (returns promise)
|
||||
this.backgroundImage = loadImg('images/BackGround1_1.png');
|
||||
this.backgroundImage = loadImg('images/backgrounds/1.png');
|
||||
}
|
||||
|
||||
async getData(weatherParameters, refresh) {
|
||||
|
||||
@@ -11,7 +11,7 @@ class Progress extends WeatherDisplay {
|
||||
super(navId, elemId, '', false);
|
||||
|
||||
// pre-load background image (returns promise)
|
||||
this.backgroundImage = loadImg('images/BackGround1_1.png');
|
||||
this.backgroundImage = loadImg('images/backgrounds/1.png');
|
||||
|
||||
// disable any navigation timing
|
||||
this.timing = false;
|
||||
|
||||
@@ -52,7 +52,7 @@ class Radar extends WeatherDisplay {
|
||||
}
|
||||
|
||||
// get the base map
|
||||
const src = 'images/4000RadarMap2.jpg';
|
||||
const src = 'images/maps/radar.jpg';
|
||||
this.baseMap = await loadImg(src);
|
||||
|
||||
const baseUrl = 'https://mesonet.agron.iastate.edu/archive/data/';
|
||||
|
||||
@@ -28,11 +28,11 @@ class RegionalForecast extends WeatherDisplay {
|
||||
// there are enough other cities available to populate the map sufficiently even if some do not load
|
||||
|
||||
// pre-load the base map
|
||||
let baseMap = 'images/Basemap2.png';
|
||||
let baseMap = 'images/map/basemap.png';
|
||||
if (weatherParameters.state === 'HI') {
|
||||
baseMap = 'images/HawaiiRadarMap4.png';
|
||||
baseMap = 'images/maps/radar-hawaii.png';
|
||||
} else if (weatherParameters.state === 'AK') {
|
||||
baseMap = 'images/AlaskaRadarMap6.png';
|
||||
baseMap = 'images/maps/radar-alaska.png';
|
||||
}
|
||||
this.elem.querySelector('.map img').src = baseMap;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user