Autofix indentation issues (eslint --fix)
This commit is contained in:
@@ -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