From f3b11b03bce080164a7d719e2ccdeedd542c5443 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 21 Jan 2025 11:33:08 +0100 Subject: [PATCH] fix: keep layer visibility after clicking on toggle all 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. --- umap/static/umap/js/modules/browser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/umap/static/umap/js/modules/browser.js b/umap/static/umap/js/modules/browser.js index 4c2f9d60..b6bd4c87 100644 --- a/umap/static/umap/js/modules/browser.js +++ b/umap/static/umap/js/modules/browser.js @@ -254,6 +254,7 @@ export default class Browser { if (datalayer.isVisible()) allHidden = false }) this._umap.eachBrowsableDataLayer((datalayer) => { + datalayer._forcedVisibility = true if (allHidden) { datalayer.show() } else {