Skip to content

Commit

Permalink
Remove obsolete check for color value (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisvasq committed Dec 2, 2024
1 parent e6510fa commit e400b6b
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/ui/views/map/ColorLegend.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,19 +231,13 @@ const NumericalColorLegend = ({
<Stack direction="row" spacing={1} style={{ marginTop: 0 }}>
<ColorPicker
colorLabel="Min"
value={R.when(
R.is(Array),
R.path([0, 'color'])
)(cp.colorPickerProps.value ?? colors[0])}
value={colors[0]}
onChange={handleChangeColorByIndex(0)}
onClose={handleClose}
/>
<ColorPicker
colorLabel="Max"
value={R.when(
R.is(Array),
R.path([1, 'color'])
)(cp.colorPickerProps.value ?? colors[1])}
value={colors[1]}
onChange={handleChangeColorByIndex(1)}
onClose={handleClose}
/>
Expand All @@ -254,10 +248,7 @@ const NumericalColorLegend = ({
<Stack key={index} direction="row" spacing={1}>
<ColorPicker
colorLabel={getColorLabel(index)}
value={R.when(
R.is(Array),
R.path([index, 'color'])
)(colors[index])}
value={colors[index]}
onChange={handleChangeColorByIndex(index)}
onClose={handleClose}
/>
Expand Down

0 comments on commit e400b6b

Please sign in to comment.