@@ -21,7 +21,7 @@ import {
|
||||
import {createCanvasContext2D} from '../../dom.js';
|
||||
import {labelCache, defaultTextAlign, measureTextHeight, measureAndCacheTextWidth, measureTextWidths} from '../canvas.js';
|
||||
import Disposable from '../../Disposable.js';
|
||||
import rbush from 'rbush';
|
||||
import RBush from 'rbush';
|
||||
|
||||
|
||||
/**
|
||||
@@ -429,7 +429,7 @@ class Executor extends Disposable {
|
||||
value: feature
|
||||
};
|
||||
if (!declutterTree) {
|
||||
declutterTree = rbush(9, undefined);
|
||||
declutterTree = new RBush(9);
|
||||
}
|
||||
if (!declutterTree.collides(box)) {
|
||||
declutterTree.insert(box);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/structs/RBush
|
||||
*/
|
||||
import {getUid} from '../util.js';
|
||||
import rbush from 'rbush';
|
||||
import RBush_ from 'rbush';
|
||||
import {createOrUpdate, equals} from '../extent.js';
|
||||
import {isEmpty} from '../obj.js';
|
||||
|
||||
@@ -31,7 +31,7 @@ class RBush {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
this.rbush_ = rbush(opt_maxEntries, undefined);
|
||||
this.rbush_ = new RBush_(opt_maxEntries);
|
||||
|
||||
/**
|
||||
* A mapping between the objects added to this rbush wrapper
|
||||
|
||||
Reference in New Issue
Block a user