From d805653e3c52c324a739fc77a9c891c4b779793c Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 7 May 2024 12:20:40 +0200 Subject: [PATCH] wip: make explicit in browser.build that we set mode only if defined --- umap/static/umap/js/modules/browser.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/umap/static/umap/js/modules/browser.js b/umap/static/umap/js/modules/browser.js index c2b8ff2b..4f00f41c 100644 --- a/umap/static/umap/js/modules/browser.js +++ b/umap/static/umap/js/modules/browser.js @@ -13,8 +13,6 @@ export default class Browser { } set mode(value) { - // Force only if mode is known, otherwise keep current mode. - if (!value) return // Store the mode so we can respect it when we redraw if (['data', 'filters'].includes(value)) this.map.panel.mode = 'expanded' else if (value === 'layers') this.map.panel.mode = 'condensed' @@ -144,7 +142,8 @@ export default class Browser { } open(mode) { - this.mode = mode + // Force only if mode is known, otherwise keep current mode. + if (mode) this.mode = mode // Get once but use it for each feature later this.filterKeys = this.map.getFilterKeys() const container = DomUtil.create('div')