mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Update rbush to 3.0.1 (close #6359)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
|
||||
import { coreDifference } from './difference';
|
||||
|
||||
|
||||
export function coreTree(head) {
|
||||
var rtree = rbush();
|
||||
var rtree = new RBush();
|
||||
var bboxes = {};
|
||||
var tree = {};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
|
||||
import { dispatch as d3_dispatch } from 'd3-dispatch';
|
||||
import { json as d3_json } from 'd3-fetch';
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
inflightTile: {},
|
||||
inflightPost: {},
|
||||
closed: {},
|
||||
rtree: rbush()
|
||||
rtree: new RBush()
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
|
||||
import { dispatch as d3_dispatch } from 'd3-dispatch';
|
||||
import { json as d3_json } from 'd3-fetch';
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
inflightTile: {},
|
||||
inflightPost: {},
|
||||
closed: {},
|
||||
rtree: rbush()
|
||||
rtree: new RBush()
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { dispatch as d3_dispatch } from 'd3-dispatch';
|
||||
import { select as d3_select, selectAll as d3_selectAll } from 'd3-selection';
|
||||
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
|
||||
import { geoExtent, geoScaleToZoom } from '../geo';
|
||||
import { svgDefs } from '../svg/defs';
|
||||
@@ -292,11 +292,11 @@ export default {
|
||||
}
|
||||
|
||||
_mlyCache = {
|
||||
images: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {} },
|
||||
images: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: new RBush(), forImageKey: {} },
|
||||
image_detections: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, forImageKey: {} },
|
||||
map_features: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush() },
|
||||
points: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush() },
|
||||
sequences: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: rbush(), forImageKey: {}, lineString: {} }
|
||||
map_features: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: new RBush() },
|
||||
points: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: new RBush() },
|
||||
sequences: { inflight: {}, loaded: {}, nextPage: {}, nextURL: {}, rtree: new RBush(), forImageKey: {}, lineString: {} }
|
||||
};
|
||||
|
||||
_mlySelectedImage = null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { json as d3_json } from 'd3-fetch';
|
||||
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
import { geoExtent } from '../geo';
|
||||
import { utilQsString } from '../util';
|
||||
|
||||
@@ -14,13 +14,13 @@ export default {
|
||||
|
||||
init: function() {
|
||||
_inflight = {};
|
||||
_nominatimCache = rbush();
|
||||
_nominatimCache = new RBush();
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
Object.values(_inflight).forEach(function(controller) { controller.abort(); });
|
||||
_inflight = {};
|
||||
_nominatimCache = rbush();
|
||||
_nominatimCache = new RBush();
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { json as d3_json } from 'd3-fetch';
|
||||
import { event as d3_event, select as d3_select, selectAll as d3_selectAll } from 'd3-selection';
|
||||
import { zoom as d3_zoom, zoomIdentity as d3_zoomIdentity } from 'd3-zoom';
|
||||
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
|
||||
import { geoExtent, geoScaleToZoom } from '../geo';
|
||||
import { utilDetect } from '../util/detect';
|
||||
@@ -194,7 +194,7 @@ export default {
|
||||
}
|
||||
|
||||
_oscCache = {
|
||||
images: { inflight: {}, loaded: {}, nextPage: {}, rtree: rbush() },
|
||||
images: { inflight: {}, loaded: {}, nextPage: {}, rtree: new RBush() },
|
||||
sequences: {}
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { dispatch as d3_dispatch } from 'd3-dispatch';
|
||||
import { xml as d3_xml } from 'd3-fetch';
|
||||
|
||||
import osmAuth from 'osm-auth';
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
|
||||
import { JXON } from '../util/jxon';
|
||||
import { geoExtent, geoRawMercator, geoVecAdd, geoZoomToScale } from '../geo';
|
||||
@@ -24,8 +24,8 @@ var oauth = osmAuth({
|
||||
});
|
||||
|
||||
var _blacklists = ['.*\.google(apis)?\..*/(vt|kh)[\?/].*([xyz]=.*){3}.*'];
|
||||
var _tileCache = { toLoad: {}, loaded: {}, inflight: {}, seen: {}, rtree: rbush() };
|
||||
var _noteCache = { toLoad: {}, loaded: {}, inflight: {}, inflightPost: {}, note: {}, closed: {}, rtree: rbush() };
|
||||
var _tileCache = { toLoad: {}, loaded: {}, inflight: {}, seen: {}, rtree: new RBush() };
|
||||
var _noteCache = { toLoad: {}, loaded: {}, inflight: {}, inflightPost: {}, note: {}, closed: {}, rtree: new RBush() };
|
||||
var _userCache = { toLoad: {}, user: {} };
|
||||
var _changeset = {};
|
||||
|
||||
@@ -380,8 +380,8 @@ export default {
|
||||
Object.values(_noteCache.inflightPost).forEach(abortRequest);
|
||||
if (_changeset.inflight) abortRequest(_changeset.inflight);
|
||||
|
||||
_tileCache = { toLoad: {}, loaded: {}, inflight: {}, seen: {}, rtree: rbush() };
|
||||
_noteCache = { toLoad: {}, loaded: {}, inflight: {}, inflightPost: {}, note: {}, closed: {}, rtree: rbush() };
|
||||
_tileCache = { toLoad: {}, loaded: {}, inflight: {}, seen: {}, rtree: new RBush() };
|
||||
_noteCache = { toLoad: {}, loaded: {}, inflight: {}, inflightPost: {}, note: {}, closed: {}, rtree: new RBush() };
|
||||
_userCache = { toLoad: {}, user: {} };
|
||||
_changeset = {};
|
||||
|
||||
@@ -1066,7 +1066,7 @@ export default {
|
||||
var target = {};
|
||||
Object.keys(source).forEach(function(k) {
|
||||
if (k === 'rtree') {
|
||||
target.rtree = rbush().fromJSON(source.rtree.toJSON()); // clone rbush
|
||||
target.rtree = new RBush().fromJSON(source.rtree.toJSON()); // clone rbush
|
||||
} else if (k === 'note') {
|
||||
target.note = {};
|
||||
Object.keys(source.note).forEach(function(id) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
selectAll as d3_selectAll
|
||||
} from 'd3-selection';
|
||||
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
import { t } from '../util/locale';
|
||||
import { jsonpRequest } from '../util/jsonp_request';
|
||||
|
||||
@@ -449,7 +449,7 @@ export default {
|
||||
}
|
||||
|
||||
_ssCache = {
|
||||
bubbles: { inflight: {}, loaded: {}, nextPage: {}, rtree: rbush(), points: {}, leaders: [] },
|
||||
bubbles: { inflight: {}, loaded: {}, nextPage: {}, rtree: new RBush(), points: {}, leaders: [] },
|
||||
sequences: {}
|
||||
};
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _throttle from 'lodash-es/throttle';
|
||||
|
||||
import { geoPath as d3_geoPath } from 'd3-geo';
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
import { textDirection } from '../util/locale';
|
||||
|
||||
import {
|
||||
@@ -19,8 +19,8 @@ export function svgLabels(projection, context) {
|
||||
var path = d3_geoPath(projection);
|
||||
var detected = utilDetect();
|
||||
var baselineHack = (detected.ie || detected.browser.toLowerCase() === 'edge');
|
||||
var _rdrawn = rbush();
|
||||
var _rskipped = rbush();
|
||||
var _rdrawn = new RBush();
|
||||
var _rskipped = new RBush();
|
||||
var _textWidthCache = {};
|
||||
var _entitybboxes = {};
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
"osm-auth": "1.0.2",
|
||||
"pannellum": "2.4.1",
|
||||
"q": "1.5.1",
|
||||
"rbush": "2.0.2",
|
||||
"rbush": "3.0.1",
|
||||
"string.fromcodepoint": "0.2.1",
|
||||
"which-polygon": "2.2.0",
|
||||
"wmf-sitematrix": "0.1.4"
|
||||
|
||||
Reference in New Issue
Block a user