Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2791: Layer Threshold Max Decreasing Fix (#4556)

christof-wittreich7fb219dc09e8
diff --git a/web/js/modules/palettes/selectors.js b/web/js/modules/palettes/selectors.js
index d5276b8cc..7113f95d8 100644
--- a/web/js/modules/palettes/selectors.js
+++ b/web/js/modules/palettes/selectors.js
@@ -7,7 +7,7 @@ import {
cloneDeep as lodashCloneDeep,
} from 'lodash';
import update from 'immutability-helper';
-import { getMinValue, getMaxValue } from './util';
+import { getMinValue } from './util';
/**
* Gets a single colormap (entries / legend combo)
@@ -287,18 +287,13 @@ const toggleLookup = function(layerId, palettesObj, state) {
return update(newPalettes, { [layerId]: { lookup: { $set: lookup } } });
};
-export function findIndex(layerId, type, value, index, groupStr, state) {
+export function findIndex(layerId, value, index, groupStr, state) {
index = index || 0;
const { values } = getPalette(layerId, index, groupStr, state).entries;
let result;
lodashEach(values, (check, index) => {
const min = getMinValue(check);
- const max = getMaxValue(check);
- if (type === 'min' && value === min) {
- result = index;
- return false;
- }
- if (type === 'max' && value === max) {
+ if (value === min) {
result = index;
return false;
}
diff --git a/web/js/modules/palettes/util.js b/web/js/modules/palettes/util.js
index 16d0075c3..86cd560fc 100644
--- a/web/js/modules/palettes/util.js
+++ b/web/js/modules/palettes/util.js
@@ -372,7 +372,6 @@ export function loadPalettes(permlinkState, state) {
min.push(
findPaletteExtremeIndex(
layerId,
- 'min',
value,
index,
stateObj.groupStr,
@@ -390,7 +389,6 @@ export function loadPalettes(permlinkState, state) {
max.push(
findPaletteExtremeIndex(
layerId,
- 'max',
value,
index,
stateObj.groupStr,
diff --git a/web/scss/components/range.scss b/web/scss/components/range.scss
index df13448db..14937a0ba 100644
--- a/web/scss/components/range.scss
+++ b/web/scss/components/range.scss
@@ -120,6 +120,7 @@
&.start-range::-moz-range-track {
height: 4px;
border: solid 1px #ccc;
+ border-left: none;
border-right: none;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
@@ -148,6 +149,7 @@
height: 4px;
border: solid 1px #ccc;
border-left: none;
+ border-right: none;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
background: linear-gradient(