Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix threshold labels #1726

Benjamin Kingb041b4e7c259
diff --git a/web/js/components/layer/settings/threshold.js b/web/js/components/layer/settings/threshold.js
index ca4f918ae..894127bea 100644
--- a/web/js/components/layer/settings/threshold.js
+++ b/web/js/components/layer/settings/threshold.js
@@ -74,8 +74,14 @@ class ThresholdSelect extends React.Component {
const { start, end, squashed } = this.state;
const { index, min, max, legend } = this.props;
const units = legend.units || '';
- const startLabel = legend.tooltips[start] + ' ' + units;
- const endLabel = legend.tooltips[end] + ' ' + units;
+ const startLabel =
+ start === 0 && legend.minLabel
+ ? legend.minLabel + ' ' + units
+ : legend.tooltips[start] + ' ' + units;
+ const endLabel =
+ end === legend.tooltips.length - 1 && legend.maxLabel
+ ? legend.maxLabel + ' ' + units
+ : legend.tooltips[end] + ' ' + units;
return (
<div className="layer-threshold-select settings-component">
<h2 className="wv-header">Thresholds</h2>