wip: make explicit in browser.build that we set mode only if defined

This commit is contained in:
Yohan Boniface 2024-05-07 12:20:40 +02:00
parent 0b98ef2f9d
commit d805653e3c

View file

@ -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')