Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

remove unneeded lodash functions #3343

Ben King64fd6d1d90ff
diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_MGRS_Granule_Grid.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_MGRS_Granule_Grid.json
index 18cb254ab..58fb7a0c1 100644
--- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_MGRS_Granule_Grid.json
+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_MGRS_Granule_Grid.json
@@ -11,7 +11,7 @@
"product": "",
"type": "vector",
"wrapX": true,
- "snapshot": false
+ "disableSnapshot": true
}
}
}
\ No newline at end of file
diff --git a/doc/config/layers.md b/doc/config/layers.md
index 61ec8250b..295c27f68 100644
--- a/doc/config/layers.md
+++ b/doc/config/layers.md
@@ -105,7 +105,7 @@ Example:
* **track**: Classify a layer's track direction. This will usually be either ascending or descending and will be displayed within the title of the layer in the Measurement / Sources add modal view if provided.
* **description**: Point to a markdown file within the metadata folder to provide a layer description.
* **wrapX**: Wrap the layer across the anti-meridian.
-* **snapshot**: Ability to be downloaded via worldview snapshots (WVS). Default is `true`.
+* **disableSnapshot**: Disable downloaded via worldview snapshots (WVS).
* **wrapadjacentdays**: Wrap the layer across the anti-meridian but select the previous day when greater than 180 and the next day when less than -180.
* **palette**: To display a color palette legend, a `palette` object should exist with the following properties:
* **id**: Identifier of the palette. This should match the name of the colormap file without the extension.
diff --git a/schemas/layer-config.json b/schemas/layer-config.json
index e620e56c0..38e3e5b3c 100644
--- a/schemas/layer-config.json
+++ b/schemas/layer-config.json
@@ -38,7 +38,7 @@
"tags": {
"type": "string"
},
- "snapshot": {
+ "disableSnapshot": {
"type": "boolean"
},
"group": {
diff --git a/web/js/modules/image-download/util.js b/web/js/modules/image-download/util.js
index 9a1616baa..e167b1501 100644
--- a/web/js/modules/image-download/util.js
+++ b/web/js/modules/image-download/util.js
@@ -297,8 +297,7 @@ export function getPixelFromPercentage(maxDimension, percent) {
* @return {Bool}
*/
export function hasNonDownloadableVisibleLayer(visibleLayers) {
- const notDownloadable = !!lodashFind(visibleLayers, { snapshot: false });
- return notDownloadable;
+ return visibleLayers.some(({ disableSnapshot = false }) => disableSnapshot);
}
/**
* Get string of layers to be removed if alert is accepted
@@ -337,5 +336,5 @@ export function getNonDownloadableLayerWarning(nonDownloadableLayer) {
* @return {Array}
*/
export function getNonDownloadableLayers(visibleLayers) {
- return lodashFilter(visibleLayers, { snapshot: false });
+ return visibleLayers.filter(({ disableSnapshot = false }) => disableSnapshot);
}