aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2020-01-15 11:23:07 +0000
committerDave Arter <davea@mysociety.org>2020-01-21 09:55:13 +0000
commit2d361666bb01d643a1f270fe71ac9ddc61af8013 (patch)
tree625404b04fa1b630b1e57ab397c489e89d015f8a
parentc0fbe0a55bb2c24fb7e07b0972a3306c00552d1c (diff)
Reduce saturation of basemap when heatmap is active
This helps distinguish between the heatmap and underlying features
-rw-r--r--web/cobrands/fixmystreet/density-map.js3
-rw-r--r--web/cobrands/sass/_base.scss6
2 files changed, 9 insertions, 0 deletions
diff --git a/web/cobrands/fixmystreet/density-map.js b/web/cobrands/fixmystreet/density-map.js
index 9febf66d7..601e6cdca 100644
--- a/web/cobrands/fixmystreet/density-map.js
+++ b/web/cobrands/fixmystreet/density-map.js
@@ -55,9 +55,11 @@ $(function(){
$('#heatmap_yes').on('click', function() {
fixmystreet.markers.setVisibility(false);
heat_layer.setVisibility(true);
+ $(fixmystreet.map.div).addClass("heatmap-active");
});
$('#heatmap_no').on('click', function() {
+ $(fixmystreet.map.div).removeClass("heatmap-active");
heat_layer.setVisibility(false);
fixmystreet.markers.setVisibility(true);
});
@@ -65,6 +67,7 @@ $(function(){
if (heatmap_on) {
fixmystreet.markers.setVisibility(false);
heat_layer.setVisibility(true);
+ $(fixmystreet.map.div).addClass("heatmap-active");
}
$('#sort').closest('.report-list-filters').hide();
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index ced554249..6f1aba817 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -1683,6 +1683,12 @@ input.final-submit {
height: 100%;
// Needs to be position:absolute for the mobile banners to show on top
position: absolute;
+
+ &.heatmap-active {
+ .olLayerGrid, .olBackBuffer {
+ filter: grayscale(0.75);
+ }
+ }
}
}