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 -5
View File
@@ -17,7 +17,7 @@ import { utilGetDimensions } from '../util/dimensions';
import { utilRebind } from '../util/rebind';
import { utilZoomPan } from '../util/zoom_pan';
import { utilDoubleUp } from '../util/double_up';
import { isArray } from 'lodash-es';
import { isArray, clamp } from 'lodash-es';
// constants
var TILESIZE = 256;
@@ -26,10 +26,6 @@ var maxZoom = 24;
var kMin = geoZoomToScale(minZoom, TILESIZE);
var kMax = geoZoomToScale(maxZoom, TILESIZE);
function clamp(num, min, max) {
return Math.max(min, Math.min(num, max));
}
export function rendererMap(context) {
var dispatch = d3_dispatch(