Skip to content

Commit 320f5d6

Browse files
committed
Merge pull request #3 from statico/maxdepth-maxchildren
Fixed propagation of maxDepth and maxChildren.
2 parents 5873016 + 2f7b16b commit 320f5d6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

JavaScript/QuadTree/src/QuadTree.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Node.prototype.subdivide = function()
255255
width:b_w_h,
256256
height:b_h_h
257257
},
258-
depth);
258+
depth, this._maxDepth, this._maxChildren);
259259

260260
//top right
261261
this.nodes[Node.TOP_RIGHT] = new this._classConstructor({
@@ -264,7 +264,7 @@ Node.prototype.subdivide = function()
264264
width:b_w_h,
265265
height:b_h_h
266266
},
267-
depth);
267+
depth, this._maxDepth, this._maxChildren);
268268

269269
//bottom left
270270
this.nodes[Node.BOTTOM_LEFT] = new this._classConstructor({
@@ -273,7 +273,7 @@ Node.prototype.subdivide = function()
273273
width:b_w_h,
274274
height:b_h_h
275275
},
276-
depth);
276+
depth, this._maxDepth, this._maxChildren);
277277

278278

279279
//bottom right
@@ -283,7 +283,7 @@ Node.prototype.subdivide = function()
283283
width:b_w_h,
284284
height:b_h_h
285285
},
286-
depth);
286+
depth, this._maxDepth, this._maxChildren);
287287
}
288288

289289
Node.prototype.clear = function()
@@ -428,4 +428,4 @@ if ( typeof Object.getPrototypeOf !== "function" ) {
428428
}
429429
*/
430430

431-
}(window));
431+
}(window));

0 commit comments

Comments
 (0)