Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

update opacity for breakpoint sublayers (#4384)

Ryan Weiler555530cc20cf
diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.js
index 34e86984f..84700cee2 100644
--- a/web/js/map/layerbuilder.js
+++ b/web/js/map/layerbuilder.js
@@ -289,6 +289,11 @@ export default function mapLayerBuilder(config, cache, store) {
}
}
layer.setOpacity(opacity || 1.0);
+ if (breakPointLayer) {
+ layer.getLayersArray().forEach((l) => {
+ l.setOpacity(opacity || 1.0);
+ });
+ }
return layer;
};
diff --git a/web/js/mapUI/components/update-opacity/updateOpacity.js b/web/js/mapUI/components/update-opacity/updateOpacity.js
index 4803cfafc..0c7be066f 100644
--- a/web/js/mapUI/components/update-opacity/updateOpacity.js
+++ b/web/js/mapUI/components/update-opacity/updateOpacity.js
@@ -69,8 +69,11 @@ function UpdateOpacity(props) {
if (def.type === 'granule') {
updateGranuleLayerOpacity(def, activeString, opacity, compare);
} else {
- const layer = findLayer(def, activeString);
- layer.setOpacity(opacity);
+ const layerGroup = findLayer(def, activeString);
+ layerGroup.setOpacity(opacity);
+ layerGroup.getLayersArray().forEach((l) => {
+ l.setOpacity(opacity);
+ });
}
updateLayerVisibilities();
};