Bugfix: Let's do some debugging

This commit is contained in:
Starbeamrainbowlabs 2019-04-14 21:59:06 +01:00
parent 90fd9da348
commit 98361ec2a9
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 7 additions and 5 deletions

View file

@ -3,7 +3,6 @@
// Import leaflet, but some plugins require it to have the variable name 'L' :-/ // Import leaflet, but some plugins require it to have the variable name 'L' :-/
import L from 'leaflet'; import L from 'leaflet';
import 'leaflet-fullscreen'; import 'leaflet-fullscreen';
import 'iso8601-js-period';
import '../../node_modules/leaflet-timedimension/dist/leaflet.timedimension.src.withlog.js'; import '../../node_modules/leaflet-timedimension/dist/leaflet.timedimension.src.withlog.js';
import Config from './Config.mjs'; import Config from './Config.mjs';
@ -63,10 +62,6 @@ class MapManager {
} }
setup_time_dimension() { 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({ this.layer_time = new L.TimeDimension({
period: "PT1H", // 1 hour period: "PT1H", // 1 hour
timeInterval: `2019-01-01T12:00:00Z/${new Date().toISOString()}` timeInterval: `2019-01-01T12:00:00Z/${new Date().toISOString()}`

View file

@ -7,7 +7,14 @@ import '../../node_modules/leaflet-timedimension/dist/leaflet.timedimension.cont
import MapManager from './MapManager.mjs'; import MapManager from './MapManager.mjs';
import 'iso8601-js-period';
window.addEventListener("load", function(_event) { window.addEventListener("load", function(_event) {
window.map_manager = new MapManager(); window.map_manager = new MapManager();
window.map_manager.setup(); 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.`);
}); });