use lodash-es everywhere, replace custom clamp methods with lodash

This commit is contained in:
Martin Raifer
2025-04-21 14:43:35 +02:00
parent 4254e67ca7
commit aa96a67c65
12 changed files with 15 additions and 28 deletions
@@ -1,6 +1,7 @@
import {
select as d3_select
} from 'd3-selection';
import { clamp } from 'lodash-es';
import { prefs } from '../../core/preferences';
import { t, localizer } from '../../core/localizer';
@@ -27,10 +28,6 @@ export function uiSectionBackgroundDisplayOptions(context) {
sharpness: 1
};
function clamp(x, min, max) {
return Math.max(min, Math.min(x, max));
}
function updateValue(d, val) {
val = clamp(val, _minVal, _maxVal);