Merge pull request #1030 from elemoine/touches
Exclude tiles that touches the source extent
This commit is contained in:
@@ -122,7 +122,7 @@ describe('ol.extent', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('intersect', function() {
|
||||
describe('intersects', function() {
|
||||
|
||||
it('returns the expected value', function() {
|
||||
var intersects = ol.extent.intersects;
|
||||
@@ -157,6 +157,23 @@ describe('ol.extent', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('touches', function() {
|
||||
|
||||
it('returns the expected value', function() {
|
||||
var touches = ol.extent.touches;
|
||||
var extent = [50, 50, 100, 100];
|
||||
expect(touches(extent, [20, 20, 80, 80])).to.be(false);
|
||||
expect(touches(extent, [20, 20, 50, 80])).to.be(true);
|
||||
expect(touches(extent, [20, 20, 50, 40])).to.be(false);
|
||||
expect(touches(extent, [100, 20, 140, 80])).to.be(true);
|
||||
expect(touches(extent, [100, 20, 140, 40])).to.be(false);
|
||||
expect(touches(extent, [20, 20, 80, 50])).to.be(true);
|
||||
expect(touches(extent, [20, 20, 40, 50])).to.be(false);
|
||||
expect(touches(extent, [20, 100, 80, 140])).to.be(true);
|
||||
expect(touches(extent, [20, 100, 40, 140])).to.be(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('normalize', function() {
|
||||
it('returns the expected coordinate', function() {
|
||||
var extent = [0, 1, 2, 3];
|
||||
|
||||
Reference in New Issue
Block a user