Bugfix: Let's do some debugging

pull/35/head
Starbeamrainbowlabs 4 years ago
parent 90fd9da348
commit 98361ec2a9
Signed by: sbrl
GPG Key ID: 1BE5172E637709C2
  1. 5
      client_src/js/MapManager.mjs
  2. 7
      client_src/js/index.mjs

@ -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…
Cancel
Save