index module

This commit is contained in:
Matt Walsh
2022-11-22 10:45:17 -06:00
parent 33570a8030
commit 6e2abf6720
7 changed files with 588 additions and 574 deletions

View File

@@ -0,0 +1,11 @@
const UNITS = {
english: Symbol('english'),
metric: Symbol('metric'),
};
export {
UNITS,
};
window.UNITS = UNITS;
console.log('config');

View File

@@ -1,19 +1,14 @@
// navigation handles progress, next/previous and initial load messages from the parent frame
/* globals index, utils, StationInfo, STATUS */
/* globals index, utils, StationInfo, STATUS, UNITS */
/* globals CurrentWeather, LatestObservations, TravelForecast, RegionalForecast, LocalForecast, ExtendedForecast, Almanac, Radar, Progress, Hourly */
document.addEventListener('DOMContentLoaded', () => {
navigation.init();
});
const UNITS = {
english: Symbol('english'),
metric: Symbol('metric'),
};
const navigation = (() => {
let displays = [];
let currentUnits = UNITS.english;
let currentUnits;
let playing = false;
let progress;
const weatherParameters = {};
@@ -25,6 +20,7 @@ const navigation = (() => {
const init = async () => {
// set up resize handler
window.addEventListener('resize', resize);
currentUnits = UNITS.english;
};
const message = (data) => {