mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-11-22 06:23:01 +00:00
Bugfix: Let's do some debugging
This commit is contained in:
parent
90fd9da348
commit
98361ec2a9
2 changed files with 7 additions and 5 deletions
|
@ -3,7 +3,6 @@
|
|||
// Import leaflet, but some plugins require it to have the variable name 'L' :-/
|
||||
import L from 'leaflet';
|
||||
import 'leaflet-fullscreen';
|
||||
import 'iso8601-js-period';
|
||||
import '../../node_modules/leaflet-timedimension/dist/leaflet.timedimension.src.withlog.js';
|
||||
|
||||
import Config from './Config.mjs';
|
||||
|
@ -63,10 +62,6 @@ class MapManager {
|
|||
}
|
||||
|
||||
setup_time_dimension() {
|
||||
// Ensure terser doesn't tree-shake iso8601-js-period
|
||||
if(nezasa.iso8601.period)
|
||||
console.debug("iso8601-js-period is loaded.");
|
||||
|
||||
this.layer_time = new L.TimeDimension({
|
||||
period: "PT1H", // 1 hour
|
||||
timeInterval: `2019-01-01T12:00:00Z/${new Date().toISOString()}`
|
||||
|
|
|
@ -7,7 +7,14 @@ import '../../node_modules/leaflet-timedimension/dist/leaflet.timedimension.cont
|
|||
|
||||
import MapManager from './MapManager.mjs';
|
||||
|
||||
import 'iso8601-js-period';
|
||||
|
||||
window.addEventListener("load", function(_event) {
|
||||
window.map_manager = new MapManager();
|
||||
window.map_manager.setup();
|
||||
|
||||
console.log("iso8601-js-period namespace: ", window.nezasa);
|
||||
|
||||
// Ensure terser doesn't tree-shake iso8601-js-period
|
||||
console.debug(`iso8601-js-period ${nezasa.iso8601.Period?"is":"is not"} loaded.`);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue