Interactive interface for browsing global, full-resolution satellite imagery
only update checkbox if custom palette is in effect
Mike McGann9a5cd60407b7
diff --git a/web/js/layers/options.js b/web/js/layers/options.jsindex c78215683..53259bc8a 100644--- a/web/js/layers/options.js+++ b/web/js/layers/options.js@@ -98,7 +98,6 @@ export function layersOptions(config, models, layer, layerGroupStr) {$('#wv-squash-button-check').on('ifChanged', function() {var squash = $('#wv-squash-button-check').prop('checked');- // var $slider = $("#wv-range-slider");var $slider = $range;models.palettes.setRange(layer.id,@@ -247,10 +246,13 @@ export function layersOptions(config, models, layer, layerGroupStr) {$range.val([imin, imax]);}- if (palette.squash) {- $('#wv-squash-button-check').iCheck('check');- } else {- $('#wv-squash-button-check').iCheck('uncheck');+ // If the squash value is undefined, no custom pallete is in effect.+ if (palette.squash !== undefined) {+ if (palette.squash) {+ $('#wv-squash-button-check').iCheck('check');+ } else {+ $('#wv-squash-button-check').iCheck('uncheck');+ }}};