Autofix indentation issues (eslint --fix)
This commit is contained in:
@@ -208,29 +208,29 @@ describe('ol.geom.Circle', function() {
|
||||
describe('#intersectsExtent', function() {
|
||||
|
||||
it('returns false for non-intersecting extents (wide outside own bbox)',
|
||||
function() {
|
||||
var wideOutsideLeftTop = [-3, 2, -2, 3];
|
||||
var wideOutsideRightTop = [2, 2, 3, 3];
|
||||
var wideOutsideRightBottom = [2, -3, 3, -2];
|
||||
var wideOutsideLeftBottom = [-3, -3, -2, -2];
|
||||
expect(circle.intersectsExtent(wideOutsideLeftTop)).to.be(false);
|
||||
expect(circle.intersectsExtent(wideOutsideRightTop)).to.be(false);
|
||||
expect(circle.intersectsExtent(wideOutsideRightBottom)).to.be(false);
|
||||
expect(circle.intersectsExtent(wideOutsideLeftBottom)).to.be(false);
|
||||
}
|
||||
function() {
|
||||
var wideOutsideLeftTop = [-3, 2, -2, 3];
|
||||
var wideOutsideRightTop = [2, 2, 3, 3];
|
||||
var wideOutsideRightBottom = [2, -3, 3, -2];
|
||||
var wideOutsideLeftBottom = [-3, -3, -2, -2];
|
||||
expect(circle.intersectsExtent(wideOutsideLeftTop)).to.be(false);
|
||||
expect(circle.intersectsExtent(wideOutsideRightTop)).to.be(false);
|
||||
expect(circle.intersectsExtent(wideOutsideRightBottom)).to.be(false);
|
||||
expect(circle.intersectsExtent(wideOutsideLeftBottom)).to.be(false);
|
||||
}
|
||||
);
|
||||
|
||||
it('returns false for non-intersecting extents (inside own bbox)',
|
||||
function() {
|
||||
var nearOutsideLeftTop = [-1, 0.9, -0.9, 1];
|
||||
var nearOutsideRightTop = [0.9, 0.9, 1, 1];
|
||||
var nearOutsideRightBottom = [0.9, -1, 1, -0.9];
|
||||
var nearOutsideLeftBottom = [-1, -1, -0.9, -0.9];
|
||||
expect(circle.intersectsExtent(nearOutsideLeftTop)).to.be(false);
|
||||
expect(circle.intersectsExtent(nearOutsideRightTop)).to.be(false);
|
||||
expect(circle.intersectsExtent(nearOutsideRightBottom)).to.be(false);
|
||||
expect(circle.intersectsExtent(nearOutsideLeftBottom)).to.be(false);
|
||||
}
|
||||
function() {
|
||||
var nearOutsideLeftTop = [-1, 0.9, -0.9, 1];
|
||||
var nearOutsideRightTop = [0.9, 0.9, 1, 1];
|
||||
var nearOutsideRightBottom = [0.9, -1, 1, -0.9];
|
||||
var nearOutsideLeftBottom = [-1, -1, -0.9, -0.9];
|
||||
expect(circle.intersectsExtent(nearOutsideLeftTop)).to.be(false);
|
||||
expect(circle.intersectsExtent(nearOutsideRightTop)).to.be(false);
|
||||
expect(circle.intersectsExtent(nearOutsideRightBottom)).to.be(false);
|
||||
expect(circle.intersectsExtent(nearOutsideLeftBottom)).to.be(false);
|
||||
}
|
||||
);
|
||||
|
||||
it('returns true for extents that intersect clearly', function() {
|
||||
|
||||
@@ -13,10 +13,10 @@ describe('ol.geom.flat.center', function() {
|
||||
[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]
|
||||
]]);
|
||||
var got = ol.geom.flat.center.linearRingss(
|
||||
squareMultiPoly.flatCoordinates,
|
||||
0,
|
||||
squareMultiPoly.endss_,
|
||||
2
|
||||
squareMultiPoly.flatCoordinates,
|
||||
0,
|
||||
squareMultiPoly.endss_,
|
||||
2
|
||||
);
|
||||
expect(got).to.eql([0.5, 0.5]);
|
||||
});
|
||||
@@ -31,24 +31,24 @@ describe('ol.geom.flat.center', function() {
|
||||
]
|
||||
]);
|
||||
var got = ol.geom.flat.center.linearRingss(
|
||||
squareMultiPoly.flatCoordinates,
|
||||
0,
|
||||
squareMultiPoly.endss_,
|
||||
2
|
||||
squareMultiPoly.flatCoordinates,
|
||||
0,
|
||||
squareMultiPoly.endss_,
|
||||
2
|
||||
);
|
||||
expect(got).to.eql([0.5, 0.5, 3.5, 0.5]);
|
||||
});
|
||||
|
||||
it('does not care about holes', function() {
|
||||
var polywithHole = new ol.geom.MultiPolygon([[
|
||||
[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]],
|
||||
[[1, 1], [1, 4], [4, 4], [4, 1], [1, 1]]
|
||||
[[0, 0], [0, 5], [5, 5], [5, 0], [0, 0]],
|
||||
[[1, 1], [1, 4], [4, 4], [4, 1], [1, 1]]
|
||||
]]);
|
||||
var got = ol.geom.flat.center.linearRingss(
|
||||
polywithHole.flatCoordinates,
|
||||
0,
|
||||
polywithHole.endss_,
|
||||
2
|
||||
polywithHole.flatCoordinates,
|
||||
0,
|
||||
polywithHole.endss_,
|
||||
2
|
||||
);
|
||||
expect(got).to.eql([2.5, 2.5]);
|
||||
});
|
||||
|
||||
@@ -23,12 +23,12 @@ describe('ol.geom.flat.interpolate', function() {
|
||||
|
||||
it('returns the expected value when the mid point is an existing ' +
|
||||
'coordinate',
|
||||
function() {
|
||||
var flatCoordinates = [0, 1, 2, 3, 4, 5];
|
||||
var point = ol.geom.flat.interpolate.lineString(
|
||||
flatCoordinates, 0, 6, 2, 0.5);
|
||||
expect(point).to.eql([2, 3]);
|
||||
});
|
||||
function() {
|
||||
var flatCoordinates = [0, 1, 2, 3, 4, 5];
|
||||
var point = ol.geom.flat.interpolate.lineString(
|
||||
flatCoordinates, 0, 6, 2, 0.5);
|
||||
expect(point).to.eql([2, 3]);
|
||||
});
|
||||
|
||||
xit('also when vertices are repeated', function() {
|
||||
var flatCoordinates = [0, 1, 2, 3, 2, 3, 4, 5];
|
||||
@@ -39,12 +39,12 @@ describe('ol.geom.flat.interpolate', function() {
|
||||
|
||||
it('returns the expected value when the midpoint falls halfway between ' +
|
||||
'two existing coordinates',
|
||||
function() {
|
||||
var flatCoordinates = [0, 1, 2, 3, 4, 5, 6, 7];
|
||||
var point = ol.geom.flat.interpolate.lineString(
|
||||
flatCoordinates, 0, 8, 2, 0.5);
|
||||
expect(point).to.eql([3, 4]);
|
||||
});
|
||||
function() {
|
||||
var flatCoordinates = [0, 1, 2, 3, 4, 5, 6, 7];
|
||||
var point = ol.geom.flat.interpolate.lineString(
|
||||
flatCoordinates, 0, 8, 2, 0.5);
|
||||
expect(point).to.eql([3, 4]);
|
||||
});
|
||||
|
||||
xit('also when vertices are repeated', function() {
|
||||
var flatCoordinates = [0, 1, 2, 3, 2, 3, 4, 5, 6, 7];
|
||||
|
||||
@@ -74,14 +74,14 @@ describe('ol.geom.flat.intersectsextent', function() {
|
||||
});
|
||||
describe('boundary does not intersect the extent and ring does not ' +
|
||||
'contain a corner of the extent',
|
||||
function() {
|
||||
it('returns false', function() {
|
||||
var extent = [2.0, 0.5, 3, 1.5];
|
||||
var r = ol.geom.flat.intersectsextent.linearRing(
|
||||
flatCoordinates, 0, flatCoordinates.length, 2, extent);
|
||||
expect(r).to.be(false);
|
||||
});
|
||||
});
|
||||
function() {
|
||||
it('returns false', function() {
|
||||
var extent = [2.0, 0.5, 3, 1.5];
|
||||
var r = ol.geom.flat.intersectsextent.linearRing(
|
||||
flatCoordinates, 0, flatCoordinates.length, 2, extent);
|
||||
expect(r).to.be(false);
|
||||
});
|
||||
});
|
||||
describe('ring contains the extent', function() {
|
||||
it('returns true', function() {
|
||||
var extent = [0.75, -0.25, 1.25, 0.25];
|
||||
|
||||
Reference in New Issue
Block a user