From b804b5bc41a92b4ce5126cf70bc97e50f9895004 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Wed, 27 Jun 2018 09:29:54 +0200 Subject: [PATCH] Move openPanel after this.permissions has been set --- umap/static/umap/js/umap.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 28cd4e0d..28602bac 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -149,10 +149,6 @@ L.U.Map.include({ } delete this.options.displayDataBrowserOnLoad; } - this.onceDatalayersLoaded(function () { - if (this.options.onLoadPanel === 'databrowser') this.openBrowser(); - else if (this.options.onLoadPanel === 'caption') this.displayCaption(); - }); this.ui.on('panel:closed', function () { this.invalidateSize({pan: false}); @@ -208,6 +204,10 @@ L.U.Map.include({ this.initEditBar(); } this.initShortcuts(); + this.onceDatalayersLoaded(function () { + if (this.options.onLoadPanel === 'databrowser') this.openBrowser(); + else if (this.options.onLoadPanel === 'caption') this.displayCaption(); + }); window.onbeforeunload = function (e) {