diff --git a/umap/static/umap/js/modules/caption.js b/umap/static/umap/js/modules/caption.js index 3374eabc..9ebe01ce 100644 --- a/umap/static/umap/js/modules/caption.js +++ b/umap/static/umap/js/modules/caption.js @@ -31,7 +31,7 @@ export default class Caption { const p = DomUtil.create('p', 'datalayer-legend', container), legend = DomUtil.create('span', '', p), headline = DomUtil.create('strong', '', p) - datalayer.onceLoaded(function () { + datalayer.onceLoaded(() => { datalayer.renderLegend(legend) if (datalayer.options.description) { DomUtil.element({ @@ -89,8 +89,8 @@ export default class Caption { const urls = { leaflet: 'http://leafletjs.com', django: 'https://www.djangoproject.com', - umap: 'http://wiki.openstreetmap.org/wiki/UMap', - changelog: 'https://umap-project.readthedocs.io/en/master/changelog/', + umap: 'https://umap-project.org/', + changelog: 'https://docs.umap-project.org/en/master/changelog/', version: this.map.options.umap_version, } const creditHTML = translate( diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index e99d346e..8bc9ac21 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -912,15 +912,11 @@ U.Map = L.Map.extend({ }, openBrowser: function (mode) { - this.onceDatalayersLoaded(function () { - this.browser.open(mode) - }) + this.onceDatalayersLoaded(() => this.browser.open(mode)) }, openCaption: function () { - this.onceDatalayersLoaded(function () { - this.caption.open() - }) + this.onceDatalayersLoaded(() => this.caption.open()) }, eachDataLayer: function (method, context) {