mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 13:59:27 +02:00
use lodash-es everywhere, replace custom clamp methods with lodash
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { geoArea as d3_geoArea, geoMercatorRaw as d3_geoMercatorRaw } from 'd3-geo';
|
||||
import { json as d3_json } from 'd3-fetch';
|
||||
import { escape } from 'lodash';
|
||||
import { escape } from 'lodash-es';
|
||||
|
||||
import { t, localizer } from '../core/localizer';
|
||||
import { geoExtent, geoSphericalDistance } from '../geo';
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user