Only update the rbush item if the extent has changed

This commit is contained in:
Frederic Junod
2015-01-14 10:40:56 +01:00
parent 017ff47bf8
commit baf424f99c
2 changed files with 20 additions and 2 deletions

View File

@@ -44,6 +44,14 @@ describe('ol.structs.RBush', function() {
expect(rBush.getInExtent([2, 2, 3, 3])).to.eql([obj]);
});
it('don\'t throws an exception if the extent is not modified', function() {
expect(function() {
rBush.forEach(function(value) {
rBush.update([0, 0, 1, 1], obj);
});
}).not.to.throwException();
});
});
describe('with a few objects', function() {