Commit 02e514b8132a97944c00e3b4de6143556727d8f3

Authored by Antoine Goutenoir
1 parent 67db4e6a
Exists in master

docs: add some info logs

Showing 1 changed file with 4 additions and 1 deletions   Show diff stats
flaskr/static/js/plots/emissions-equidistant-map.js
1 1 // jQuery-free
2   -function draw_emissions_equidistant_map(containerSelector, worldDataUrl, countriesDataUrl, emissionsDataUrl) {
  2 +function draw_emissions_equidistant_map(containerSelector, worldDataUrl, emissionsDataUrl) {
3 3 let margin = {top: 48, right: 88, bottom: 68, left: 98},
4 4 width = 960 - margin.left - margin.right,
5 5 height = 540 - margin.top - margin.bottom;
... ... @@ -362,6 +362,7 @@ function draw_emissions_equidistant_map(containerSelector, worldDataUrl, countri
362 362  
363 363  
364 364 document.addEventListener("DOMContentLoaded", () => {
  365 + console.info("[Emissions Equidistant Map] Starting…");
365 366 width = document.querySelector(containerSelector).parentElement.offsetWidth;
366 367 width = width - margin.left - margin.right;
367 368 svg = d3.select(containerSelector)
... ... @@ -373,12 +374,14 @@ function draw_emissions_equidistant_map(containerSelector, worldDataUrl, countri
373 374 d3.csv(emissionsDataUrl),
374 375 d3.json(worldDataUrl),
375 376 ]).then((allTheData) => {
  377 + console.info("[Emissions Equidistant Map] Generating…");
376 378 [emissionsData, worldData] = allTheData;
377 379 crunchEmissionsData();
378 380 recenterOnLatLon(
379 381 parseFloat(emissionsData[0].latitude),
380 382 parseFloat(emissionsData[0].longitude)
381 383 );
  384 + console.info("[Emissions Equidistant Map] Done.-");
382 385 });
383 386  
384 387 d3.select(containerSelector+" svg").on("mousedown", function(event) {
... ...