Remove lodash omit

(re: #6087)
This commit is contained in:
Bryan Housel
2019-03-26 14:11:55 -04:00
parent e916d18473
commit 4821bf0a68
10 changed files with 41 additions and 26 deletions
+5 -6
View File
@@ -1,11 +1,10 @@
import _omit from 'lodash-es/omit';
import _throttle from 'lodash-es/throttle';
import { select as d3_select } from 'd3-selection';
import { geoSphericalDistance } from '../geo';
import { modeBrowse } from '../modes';
import { utilQsString, utilStringQs } from '../util';
import { utilObjectOmit, utilQsString, utilStringQs } from '../util';
export function behaviorHash(context) {
@@ -21,9 +20,9 @@ export function behaviorHash(context) {
return true; // replace bogus hash
} else if (s !== formatter(map).slice(1)) { // hash has changed
var mode = context.mode(),
dist = geoSphericalDistance(map.center(), [args[2], args[1]]),
maxdist = 500;
var mode = context.mode();
var dist = geoSphericalDistance(map.center(), [args[2], args[1]]);
var maxdist = 500;
// Don't allow the hash location to change too much while drawing
// This can happen if the user accidently hit the back button. #3996
@@ -40,7 +39,7 @@ export function behaviorHash(context) {
var center = map.center();
var zoom = map.zoom();
var precision = Math.max(0, Math.ceil(Math.log(zoom) / Math.LN2));
var q = _omit(utilStringQs(window.location.hash.substring(1)),
var q = utilObjectOmit(utilStringQs(window.location.hash.substring(1)),
['comment', 'source', 'hashtags', 'walkthrough']
);
var newParams = {};