Interactive interface for browsing global, full-resolution satellite imagery
fix loading with compare active
Jason Kent3a7f448127dd
diff --git a/web/js/location.js b/web/js/location.jsindex 65f80d023..77e684930 100644--- a/web/js/location.js+++ b/web/js/location.js@@ -1,4 +1,4 @@-import { get } from 'lodash';+import { get, merge } from 'lodash';import update from 'immutability-helper';import { encode } from './modules/link/util';// legacy crutches@@ -99,14 +99,8 @@ export const mapLocationToState = (state, location) => {config,);- // one level deep merge of newState with defaultState- Object.keys(stateFromLocation).forEach((key) => {- const obj = { ...state[key], ...stateFromLocation[key] };- stateFromLocation = update(stateFromLocation, {- [key]: { $set: obj },- });- });- return update(state, { $merge: stateFromLocation });+ // deep merge of initial state with location state+ return merge({}, state, stateFromLocation);}const startTour = checkTourBuildTimestamp(state.config);if (diff --git a/web/js/modules/layers/actions.js b/web/js/modules/layers/actions.jsindex 35fd7af04..619af0f41 100644--- a/web/js/modules/layers/actions.js+++ b/web/js/modules/layers/actions.js@@ -8,7 +8,6 @@ import {getActiveLayers as getActiveLayersSelector,getActiveLayersMap,activateLayersForEventCategory as activateLayersForEventCategorySelector,- getActiveOverlayGroups,} from './selectors';import {RESET_LAYERS,@@ -146,7 +145,6 @@ export function reorderLayers(reorderedLayers) {type: REORDER_LAYERS,activeString: compare.activeString,layers: reorderedLayers,- // overlayGroups: getOverlayGroups(reorderedLayers),});};}diff --git a/web/js/modules/layers/util.js b/web/js/modules/layers/util.jsindex 436759b19..d4afb2542 100644--- a/web/js/modules/layers/util.js+++ b/web/js/modules/layers/util.js@@ -1183,7 +1183,7 @@ export function mapLocationToLayerState(newStateFromLocation = update(newStateFromLocation, {layers: {activeB: {- groupOverlays: { $set: activeB.getOverlayGroups },+ groupOverlays: { $set: activeB.groupOverlays },layers: { $set: active.layers },overlayGroups: { $set: getOverlayGroups(active.layers) },},