mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
fix: keep layer visibility after clicking on toggle all (#2439)
fix #2430 Not exactly sure how to make this DRY. What we want is to mark the layer visibility as "controlled by user" as soon as they click on a show/hide/showAll/hideAll button, so we do not try to infer the visibility from the from/toZoom settings.
This commit is contained in:
commit
693e775ca8
1 changed files with 1 additions and 0 deletions
|
@ -254,6 +254,7 @@ export default class Browser {
|
||||||
if (datalayer.isVisible()) allHidden = false
|
if (datalayer.isVisible()) allHidden = false
|
||||||
})
|
})
|
||||||
this._umap.eachBrowsableDataLayer((datalayer) => {
|
this._umap.eachBrowsableDataLayer((datalayer) => {
|
||||||
|
datalayer._forcedVisibility = true
|
||||||
if (allHidden) {
|
if (allHidden) {
|
||||||
datalayer.show()
|
datalayer.show()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue