We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4293e90 commit 8f728afCopy full SHA for 8f728af
index.js
@@ -84,9 +84,6 @@ export default class Flatbush {
84
new Uint16Array(this.data, 2, 1)[0] = nodeSize;
85
new Uint32Array(this.data, 4, 1)[0] = numItems;
86
}
87
-
88
- // a priority queue for k-nearest-neighbors queries
89
- this._queue = new FlatQueue();
90
91
92
add(minX, minY, maxX, maxY) {
@@ -131,6 +128,9 @@ export default class Flatbush {
131
128
throw new Error(`Added ${this._pos >> 2} items when expected ${this.numItems}.`);
132
129
133
130
+ // a priority queue for k-nearest-neighbors queries
+ this._queue = new FlatQueue();
+
134
if (this.numItems <= this.nodeSize) {
135
// only one node, skip sorting and just fill the root box
136
this._boxes[this._pos++] = this.minX;
0 commit comments