diff --git a/Changelog.md b/Changelog.md index 4371d2e..6547c0b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,7 @@ # v0.8 - 23rd April 2019 - Update heatmap colours to match the [official DEFRA standards](https://uk-air.defra.gov.uk/air-pollution/daqi?view=more-info&pollutant=pm25#pollutant) - Bugfix: Allow different reading types to be selected once more in the bottom-left + - Bugfix: Immediately update heatmap when changing the blob radius ## v0.7.1 - 16th April 2019 - [API] `list-reading-types` no longer returns an error if a device hasn't submitted any readings yet diff --git a/client_src/js/LayerHeatmap.mjs b/client_src/js/LayerHeatmap.mjs index 0c55ca1..f101a55 100644 --- a/client_src/js/LayerHeatmap.mjs +++ b/client_src/js/LayerHeatmap.mjs @@ -272,6 +272,13 @@ class LayerHeatmap { reading_type ); } + + async refresh_display() { + await this.update_data( + this.datetime, + this.reading_type + ); + } } export default LayerHeatmap; diff --git a/client_src/js/UI.mjs b/client_src/js/UI.mjs index 7f6d778..daba86c 100644 --- a/client_src/js/UI.mjs +++ b/client_src/js/UI.mjs @@ -32,6 +32,7 @@ class UI { ], callback: ((event) => { this.map_manager.heatmap.overlay_config.radius = parseFloat(event.target.value); + this.map_manager.heatmap.refresh_display(); }).bind(this) }, {