diff --git a/CHANGELOG.md b/CHANGELOG.md index f8bed33a..d411fd0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project tries to adhere to [Semantic Versioning](https://semver.org/spe ### Fixed - 404 errors for missing MVTs - truncated tooltips +- choropleth is reactivated when revisiting status quo ### Changed - improve accessibility diff --git a/digiplan/static/js/menu.js b/digiplan/static/js/menu.js index fda946ac..b6630086 100644 --- a/digiplan/static/js/menu.js +++ b/digiplan/static/js/menu.js @@ -1,4 +1,4 @@ -import { resultsTabs, futureDropdown } from "./elements.js"; +import { resultsTabs, statusquoDropdown, futureDropdown } from "./elements.js"; import { terminateSimulation } from "./results.js"; import { hidePotentialLayers, showPotentialLayers } from "./sliders.js"; @@ -57,6 +57,7 @@ PubSub.subscribe( ); PubSub.subscribe(eventTopics.MENU_STATUS_QUO_SELECTED, hidePotentialLayers); PubSub.subscribe(eventTopics.MENU_STATUS_QUO_SELECTED, hideEmpowerplanContent); +PubSub.subscribe(eventTopics.MENU_STATUS_QUO_SELECTED, reactivateChoropleth); PubSub.subscribe(eventTopics.MENU_SETTINGS_SELECTED, setMapChartViewVisibility); PubSub.subscribe(eventTopics.MENU_SETTINGS_SELECTED, deactivateChoropleth); PubSub.subscribe(eventTopics.MENU_SETTINGS_SELECTED, terminateSimulation); @@ -188,3 +189,11 @@ function hideEmpowerplanContent(msg) { map.resize(); return logMessage(msg); } + +function reactivateChoropleth(msg) { + const choropleth = statusquoDropdown.value; + if (choropleth !== "") { + PubSub.publish(mapEvent.CHOROPLETH_SELECTED, statusquoDropdown.value); + } + return logMessage(msg); +}