Interactive interface for browsing global, full-resolution satellite imagery
Add option to disable custom palettes for AJAX Alpha Jet Ozone layer (#5823)
Patrick Moulden23aaeb520e14
diff --git a/config/default/common/config/wv.json/layers/ajax/AJAX_Alpha_Jet_Ozone.json b/config/default/common/config/wv.json/layers/ajax/AJAX_Alpha_Jet_Ozone.jsonindex 8b3d10f5e..242dd05b7 100644--- a/config/default/common/config/wv.json/layers/ajax/AJAX_Alpha_Jet_Ozone.json+++ b/config/default/common/config/wv.json/layers/ajax/AJAX_Alpha_Jet_Ozone.json@@ -11,6 +11,7 @@"ongoing": false,"disableCharting": true,"disableSnapshot": true,+ "disableCustomPalettes": true,"layergroup": "Ozone","vectorStyle": {"id": "AJAX_Alpha_Jet_Ozone",diff --git a/doc/config/layers.md b/doc/config/layers.mdindex 0276af269..576dde092 100644--- a/doc/config/layers.md+++ b/doc/config/layers.md@@ -98,6 +98,7 @@ Example:* **description**: Point to a markdown file within the metadata folder to provide a layer description.* **disableSnapshot**: Disable Worldview Snapshots (WVS) for layer.* **disableSmartHandoff**: Disable data download capability for a layer.+* **disableCustomPalettes**: Disable the option to change the layer's palette (for vector layers).* **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.* **wrapX**: Wrap the layer across the anti-meridian.* **palette**: To display a color palette legend, a `palette` object should exist with the following properties:diff --git a/web/js/components/layer/settings/layer-settings.js b/web/js/components/layer/settings/layer-settings.jsindex 7997da04e..724573b07 100644--- a/web/js/components/layer/settings/layer-settings.js+++ b/web/js/components/layer/settings/layer-settings.js@@ -352,7 +352,7 @@ class LayerSettings extends React.Component {renderCustomizations = customPalettesIsActive && palettedAllowed && layer.palette? this.renderCustomPalettes(): '';- } else if (layerGroup !== 'Orbital Track' && layerGroup !== 'Reference') {+ } else if (!layer.disableCustomPalettes && layerGroup !== 'Orbital Track' && layerGroup !== 'Reference') {// Orbital Tracks palette swap looks bad at WMS zoom levels (white text stamps)// Reference (MGRS/HLS Grid) has no need for palettesrenderCustomizations = this.renderCustomPalettes();