Interactive interface for browsing global, full-resolution satellite imagery
Pass add/remove models to component and correct CSS
Taylor Gunnoeb6cdae450db6
diff --git a/web/css/wv.layers.modal.css b/web/css/wv.layers.modal.cssindex 409373e87..9950eaad0 100644--- a/web/css/wv.layers.modal.css+++ b/web/css/wv.layers.modal.css@@ -274,13 +274,20 @@#selected-category{color: #ddd;}+.margin-as-padding{+ padding-top: 5px;+}#layers-all .layers-all-layer {padding: .5em .5em .5em .7em;+ box-sizing: border-box;+ -moz-box-sizing: border-box;+ -webkit-box-sizing: border-box;+ -o-box-sizing: border-box;+ height:48px;}#selected-category .ui-accordion-header,#layers-all .layers-all-layer {border:0;- margin-top:5px;cursor:pointer;}#selected-category .ui-accordion-header,@@ -495,8 +502,7 @@/*lazy code to put scrollbar in the right place*/#layer-categories,-#selected-category,-#layers-all+#selected-category{padding-right:10px;}diff --git a/web/js/layers/wv.layers.modal.js b/web/js/layers/wv.layers.modal.jsindex d0454d61e..39a51fa15 100644--- a/web/js/layers/wv.layers.modal.js+++ b/web/js/layers/wv.layers.modal.js@@ -635,13 +635,6 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {console.warn("In layer order but not defined", layerId);}else {- layerComponent = components({- layerId: encodeURIComponent(current.id),- onClick: function(e){console.log('test')},- title: current.title,- subtitle: current.subtitle- });-/*var $layerItem = $( '<li></li>' ).attr('id', 'layer-flat-' + current.id )@@ -935,14 +928,13 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {props.layerList = copy;layerWidget = layerList({- onClick: function(){},+ onState: model.add,+ offState: model.remove,layerArray: copy,layers: config.layers});self.reactList = ReactDOM.render(layerWidget, $allLayers[0]);- self.reactList.componentUpdate();-redoScrollbar();}, 250, { trailing: true });