Interactive interface for browsing global, full-resolution satellite imagery
remove duplicate rendering #1458
Benjamin King563588759cd2
diff --git a/web/js/sidebar/ui.js b/web/js/sidebar/ui.jsindex d10354eb9..23e18774d 100644--- a/web/js/sidebar/ui.js+++ b/web/js/sidebar/ui.js@@ -38,7 +38,6 @@ export function sidebarUi(models, config, ui) {var layerAdd = function(layer) {if (!ui.tour.resetting && !ui.naturalEvents.selecting) {updateLayers();- updateState('zotsObject', getZotsForActiveLayers(config, models, ui));}};@@ -213,11 +212,20 @@ export function sidebarUi(models, config, ui) {var updateLayers = function() {if (!ui.tour.resetting) {if (models.compare && models.compare.active) {- updateState('layerObjects');- updateState('zotsObject', getZotsForActiveLayers(config, models, ui));+ let compareObj = getCompareObjects(models);+ return self.reactComponent.setState({+ firstDateObject: compareObj.a,+ secondDateObject: compareObj.b,+ zotsObject: getZotsForActiveLayers(config, models, ui)+ });} else {- updateState('layers');- updateState('zotsObject', getZotsForActiveLayers(config, models, ui));+ self.reactComponent.setState({+ layers: models.layers.get(+ { group: 'all', proj: 'all' },+ models.layers[models.layers.activeLayers]+ ),+ zotsObject: getZotsForActiveLayers(config, models, ui)+ });}}};