wip: do not change panel color if it's not browser
Ugly way to do, but for now I haven't found a better option
This commit is contained in:
parent
41e7b34813
commit
9e3984fdcb
1 changed files with 7 additions and 2 deletions
|
@ -122,9 +122,12 @@ export default class Browser {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isOpen () {
|
||||||
|
return !!document.querySelector('.umap-browser')
|
||||||
|
}
|
||||||
|
|
||||||
onMoveEnd() {
|
onMoveEnd() {
|
||||||
const isBrowserOpen = !!document.querySelector('.umap-browse-data')
|
if (!this.isOpen()) return
|
||||||
if (!isBrowserOpen) return
|
|
||||||
const isListDynamic = this.options.inBbox
|
const isListDynamic = this.options.inBbox
|
||||||
this.map.eachBrowsableDataLayer((datalayer) => {
|
this.map.eachBrowsableDataLayer((datalayer) => {
|
||||||
if (!isListDynamic && !datalayer.hasDynamicData()) return
|
if (!isListDynamic && !datalayer.hasDynamicData()) return
|
||||||
|
@ -184,10 +187,12 @@ export default class Browser {
|
||||||
}
|
}
|
||||||
|
|
||||||
onEnableEdit () {
|
onEnableEdit () {
|
||||||
|
if (!this.isOpen()) return
|
||||||
this.map.ui._panel.classList.add('dark')
|
this.map.ui._panel.classList.add('dark')
|
||||||
}
|
}
|
||||||
|
|
||||||
onDisableEdit () {
|
onDisableEdit () {
|
||||||
|
if (!this.isOpen()) return
|
||||||
this.map.ui._panel.classList.remove('dark')
|
this.map.ui._panel.classList.remove('dark')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue