From 6d69eb855fd11ba3899409b319806512b4177aab Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 19 Oct 2024 14:02:04 +0200 Subject: [PATCH] fix: zones editor - legend to be toggable --- index.html | 2 +- modules/ui/zones-editor.js | 2 ++ versioning.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 790a4d54..d14c9381 100644 --- a/index.html +++ b/index.html @@ -8101,7 +8101,7 @@ - + diff --git a/modules/ui/zones-editor.js b/modules/ui/zones-editor.js index 0b5d069a..d575a544 100644 --- a/modules/ui/zones-editor.js +++ b/modules/ui/zones-editor.js @@ -341,6 +341,8 @@ function editZones() { } function toggleLegend() { + if (legend.selectAll("*").size()) return clearLegend(); // hide legend + const filterBy = byId("zonesFilterType").value; const isFiltered = filterBy && filterBy !== "all"; const visibleZones = pack.zones.filter(zone => !zone.hidden && (!isFiltered || zone.type === filterBy)); diff --git a/versioning.js b/versioning.js index 24c2f84a..acb67e2b 100644 --- a/versioning.js +++ b/versioning.js @@ -12,7 +12,7 @@ * * Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2 */ -const VERSION = "1.105.17"; +const VERSION = "1.105.18"; if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function"); {