Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

#269 Calculate proper height for layer list component

Taylor Gunnoec4999b422f63
diff --git a/web/css/wv.layers.modal.css b/web/css/wv.layers.modal.css
index 6a714455e..1ab9dc3f0 100644
--- a/web/css/wv.layers.modal.css
+++ b/web/css/wv.layers.modal.css
@@ -318,7 +318,6 @@
#selected-category .ui-accordion-header,
#layers-all .layers-all-layer {
border:0;
- cursor:pointer;
}
#layers-all .layers-all-title-wrap {
@@ -505,6 +504,10 @@
margin-bottom: 5px;
}
+.layers-all-header {
+ cursor: pointer;
+}
+
.layers-all-header .fa {
color: #ddd;
font-family: "FontAwesome";
@@ -573,6 +576,7 @@
}
#layers-all .metadata-more {
+ cursor: pointer;
height: 8px;
margin-top: 4px;
}
diff --git a/web/js/layers/wv.layers.modal.js b/web/js/layers/wv.layers.modal.js
index 03a93f279..7bc77d35b 100644
--- a/web/js/layers/wv.layers.modal.js
+++ b/web/js/layers/wv.layers.modal.js
@@ -167,8 +167,10 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {
modalWidth = gridItemWidth * sizeMultiplier + 10;
if(self.reactList)
self.reactList.setState({
- width:modalWidth,
- height:modalHeight
+ width: modalWidth,
+ height: modalHeight - $('#layer-modal > header').outerHeight() -
+ $breadcrumb.outerHeight()
+
});
};
@@ -695,12 +697,20 @@ wv.layers.modal = wv.layers.modal || function(models, ui, config) {
});
});
};
+ /**
+ * self.readySearch - Readies the search component
+ *
+ * @return {func} Returns a function call with the correct parameters to
+ * initialize the layer list React component
+ */
self.readySearch = function(){
return layerList({
config: config,
metadata: self.metadata,
model: model,
- width: modalWidth
+ width: modalWidth,
+ height: modalHeight - $('#layer-modal > header').outerHeight() -
+ $breadcrumb.outerHeight()
});
};