Interactive interface for browsing global, full-resolution satellite imagery
Merge branch 'development' into search-optimization
Taylor Gunnoe87f8c570a610
diff --cc Gruntfile.jsindex 5963bb65a,ca5db72a2..8eed62aeb--- a/Gruntfile.js+++ b/Gruntfile.js@@@ -28,13 -17,10 +17,15 @@@ var nodeModuleFiles ="node_modules/gifshot/build/custom/gifshot.custom.min.js","node_modules/promise-queue/lib/index.js","node_modules/openlayers/dist/ol-debug.js",+ "node_modules/openlayers/dist/ol.css",+ "node_modules/openlayers/dist/ol-debug.css","node_modules/font-awesome/css/font-awesome.min.css","node_modules/font-awesome/fonts/*",+ "node_modules/isotope-layout/dist/*",+ "node_modules/isotope-packery/packery-mode.pkgd.js",+ "node_modules/isotope-packery/packery-mode.pkgd.min.js",+ "node_modules/perfect-scrollbar/dist/js/*",+ "node_modules/perfect-scrollbar/dist/css/*","node_modules/clipboard/dist/clipboard.js","node_modules/clipboard/dist/clipboard.min.js"];diff --cc web/js/layers/wv.layers.modal.jsindex aa981a2c1,75f893c96..71cc672c4--- a/web/js/layers/wv.layers.modal.js+++ b/web/js/layers/wv.layers.modal.js@@@ -242,9 -236,19 +250,18 @@@ wv.layers.modal = wv.layers.modal || fu}};- var drawCategories = function(){-+ /**+ * var drawCategories - Draws all categories if it has non-empty measurements.+ * If it has a placement flag, that category will display first or last. If+ * there are more than 6 measurements ina category, an ellipsis is output.+ * Categories are grouped in one of two interests tabs. Each category has a unique image.+ *+ * @return {HTMLElement} Returns html to output measurements grouped by categories with+ * categories grouped by interest.+ */+ var drawCategories = function() {$categories.empty();- if ($categories.data('isotope')) {+ if( $categories.data('isotope') ) {$categories.isotope('destroy');}$allLayers.hide();@@@ -650,14 -671,14 +684,21 @@@});});};+ self.readySearch = function(){+ return layerList({+ config: config,+ model: model,+ width: modalWidth+ });+ };- // TODO: Filter layers by settings with projections equal to current projection.++ /**+ * var drawAllLayers - Draws all layers contained within a specific projection+ * and contained within the layerOrder file.+ *+ * @return {HTMLElement} Returns html with title, substitle, description and option to+ * add layer to the map.+ */var drawAllLayers = function() {var projection = models.proj.selected.id;@@@ -1000,25 -1013,22 +1047,24 @@@var fproj = filterProjections(layer);var fterms = filterSearch(layer, search);+ //This will return true if the layer needs to be hiddenvar filtered = fproj || fterms;- visible[layer.id] = !filtered;-- var display = filtered ? "none" : "block";- var selector = "#flat-layer-list li[data-layer='" + wv.util.jqueryEscape(layerId) + "']";- $(selector).css("display", display);+ if( !filtered ) {+ copy.push(layerId);+ }});+ self.reactList.setState({layerFilter: copy});+redoScrollbar();- }, 250, {trailing: true});+ }, 250, { trailing: true });- var filter = function( e ) {-- if( $( '#layers-search-input' ).val().length !== 0 ) {+ var filter = function(e) {+ if ($('#layers-search-input').val().length !== 0) {searchBool = true;- } else {+ }+ else{searchBool = false;drawModal();removeSearch();