Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

no need to pass layerGroupName on runningdata object

Jason Kenta90ab508a682
diff --git a/web/js/containers/sidebar/layer.js b/web/js/containers/sidebar/layer.js
index bb22c115e..784e612a1 100644
--- a/web/js/containers/sidebar/layer.js
+++ b/web/js/containers/sidebar/layer.js
@@ -57,7 +57,7 @@ class Layer extends React.Component {
} = this.props;
if (!lodashIsEmpty(renderedPalette)) {
const isRunningData = compare.active
- ? (runningObject || {}).layerGroupName === layerGroupName
+ ? compare.activeString === layerGroupName && !!runningObject
: !!runningObject;
const colorHex = isRunningData ? runningObject.paletteHex : null;
return (
diff --git a/web/js/map/runningdata.js b/web/js/map/runningdata.js
index 62e8a8ad1..ad8747efd 100644
--- a/web/js/map/runningdata.js
+++ b/web/js/map/runningdata.js
@@ -67,8 +67,6 @@ export function MapRunningData(models, compareUi, store) {
*/
self.newPoint = function(pixels, map) {
const state = store.getState();
- const compareState = state.compare || {};
- const layerGroupName = compareState.active && compareState.activeString;
const activeLayerObj = {};
const [lon, lat] = map.getCoordinateFromPixel(pixels);
if (!(lon < -180 || lon > 180 || lat < -90 || lat > 90)) {
@@ -94,8 +92,7 @@ export function MapRunningData(models, compareUi, store) {
}
activeLayerObj[layerId] = {
paletteLegends,
- paletteHex: color,
- layerGroupName
+ paletteHex: color
};
});
}
@@ -106,8 +103,7 @@ export function MapRunningData(models, compareUi, store) {
if (def.palette && !lodashGet(layer, 'wv.def.disableHoverValue')) {
activeLayerObj[def.id] = {
paletteLegends: getPalette(def.id, undefined, undefined, state),
- paletteHex: util.rgbaToHex(data[0], data[1], data[2], data[3]),
- layerGroupName
+ paletteHex: util.rgbaToHex(data[0], data[1], data[2], data[3])
};
}
});