Autofix indentation issues (eslint --fix)

This commit is contained in:
Marc Jansen
2017-06-19 11:58:00 +02:00
parent a17db4f45c
commit d0ef05977b
196 changed files with 1574 additions and 1574 deletions
+11 -11
View File
@@ -477,7 +477,7 @@ describe('ol.format.EsriJSON', function() {
expect(obj).to.be.a(ol.geom.LineString);
expect(obj.getLayout()).to.eql('XYZM');
expect(obj.getCoordinates()).to.eql([[10, 20, 1534, 1],
[30, 40, 1420, 2]]);
[30, 40, 1420, 2]]);
});
it('parses multilinestring', function() {
@@ -650,7 +650,7 @@ describe('ol.format.EsriJSON', function() {
expect(obj.getLayout()).to.eql('XY');
expect(obj.getCoordinates()).to.eql([
[[[0, 1], [1, 4], [4, 3], [3, 0]], [[2, 2], [3, 2],
[3, 3], [2, 3]]],
[3, 3], [2, 3]]],
[[[10, 1], [11, 5], [14, 3], [13, 0]]]
]);
});
@@ -669,7 +669,7 @@ describe('ol.format.EsriJSON', function() {
expect(obj.getLayout()).to.eql('XYZ');
expect(obj.getCoordinates()).to.eql([
[[[0, 1, 0], [1, 4, 0], [4, 3, 0], [3, 0, 0]], [[2, 2, 0], [3, 2, 0],
[3, 3, 0], [2, 3, 0]]],
[3, 3, 0], [2, 3, 0]]],
[[[10, 1, 0], [11, 5, 0], [14, 3, 0], [13, 0, 0]]]
]);
});
@@ -688,7 +688,7 @@ describe('ol.format.EsriJSON', function() {
expect(obj.getLayout()).to.eql('XYM');
expect(obj.getCoordinates()).to.eql([
[[[0, 1, 0], [1, 4, 0], [4, 3, 0], [3, 0, 0]], [[2, 2, 0], [3, 2, 0],
[3, 3, 0], [2, 3, 0]]],
[3, 3, 0], [2, 3, 0]]],
[[[10, 1, 0], [11, 5, 0], [14, 3, 0], [13, 0, 0]]]
]);
});
@@ -817,8 +817,8 @@ describe('ol.format.EsriJSON', function() {
it('encodes XYZM linestring', function() {
var linestring = new ol.geom.LineString([[10, 20, 1534, 1],
[30, 40, 1420, 1]],
'XYZM');
[30, 40, 1420, 1]],
'XYZM');
var esrijson = format.writeGeometry(linestring);
expect(linestring.getCoordinates()).to.eql(
format.readGeometry(esrijson).getCoordinates());
@@ -882,7 +882,7 @@ describe('ol.format.EsriJSON', function() {
it('encodes XYZ multipoint', function() {
var multipoint = new ol.geom.MultiPoint([[102.0, 0.0, 3],
[103.0, 1.0, 4]], 'XYZ');
[103.0, 1.0, 4]], 'XYZ');
var esrijson = format.writeGeometry(multipoint);
expect(multipoint.getCoordinates()).to.eql(
format.readGeometry(esrijson).getCoordinates());
@@ -890,7 +890,7 @@ describe('ol.format.EsriJSON', function() {
it('encodes XYM multipoint', function() {
var multipoint = new ol.geom.MultiPoint([[102.0, 0.0, 3],
[103.0, 1.0, 4]], 'XYM');
[103.0, 1.0, 4]], 'XYM');
var esrijson = format.writeGeometry(multipoint);
expect(multipoint.getCoordinates()).to.eql(
format.readGeometry(esrijson).getCoordinates());
@@ -898,7 +898,7 @@ describe('ol.format.EsriJSON', function() {
it('encodes XYZM multipoint', function() {
var multipoint = new ol.geom.MultiPoint([[102.0, 0.0, 3, 1],
[103.0, 1.0, 4, 1]], 'XYZM');
[103.0, 1.0, 4, 1]], 'XYZM');
var esrijson = format.writeGeometry(multipoint);
expect(multipoint.getCoordinates()).to.eql(
format.readGeometry(esrijson).getCoordinates());
@@ -959,7 +959,7 @@ describe('ol.format.EsriJSON', function() {
it('encodes XYZ multipolygon', function() {
var multipolygon = new ol.geom.MultiPolygon([
[[[0, 1, 0], [1, 4, 0], [4, 3, 0], [3, 0, 0]], [[2, 2, 0], [3, 2, 0],
[3, 3, 0], [2, 3, 0]]],
[3, 3, 0], [2, 3, 0]]],
[[[10, 1, 0], [11, 5, 0], [14, 3, 0], [13, 0, 0]]]
], 'XYZ');
var esrijson = format.writeGeometry(multipolygon);
@@ -970,7 +970,7 @@ describe('ol.format.EsriJSON', function() {
it('encodes XYM multipolygon', function() {
var multipolygon = new ol.geom.MultiPolygon([
[[[0, 1, 0], [1, 4, 0], [4, 3, 0], [3, 0, 0]], [[2, 2, 0], [3, 2, 0],
[3, 3, 0], [2, 3, 0]]],
[3, 3, 0], [2, 3, 0]]],
[[[10, 1, 0], [11, 5, 0], [14, 3, 0], [13, 0, 0]]]
], 'XYM');
var esrijson = format.writeGeometry(multipolygon);
+2 -2
View File
@@ -820,7 +820,7 @@ describe('ol.format.GeoJSON', function() {
it('truncates a linestring with decimals option', function() {
var linestring = new ol.geom.LineString([[42.123456789, 38.987654321],
[43, 39]]);
[43, 39]]);
var geojson = format.writeGeometry(linestring, {
decimals: 6
});
@@ -832,7 +832,7 @@ describe('ol.format.GeoJSON', function() {
it('rounds a linestring with decimals option = 0', function() {
var linestring = new ol.geom.LineString([[42.123456789, 38.987654321],
[43, 39]]);
[43, 39]]);
var geojson = format.writeGeometry(linestring, {
decimals: 0
});
+17 -17
View File
@@ -494,18 +494,18 @@ describe('ol.format.GML3', function() {
it('can read and write a linestring geometry with ' +
'correct axis order',
function() {
var text =
function() {
var text =
'<gml:LineString xmlns:gml="http://www.opengis.net/gml" ' +
' srsName="urn:x-ogc:def:crs:EPSG:4326">' +
' <gml:posList>-90 -180 90 180</gml:posList>' +
'</gml:LineString>';
var g = readGeometry(format, text);
expect(g).to.be.an(ol.geom.LineString);
expect(g.getCoordinates()).to.eql([[-180, -90, 0], [180, 90, 0]]);
var serialized = formatWGS84.writeGeometryNode(g);
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
var g = readGeometry(format, text);
expect(g).to.be.an(ol.geom.LineString);
expect(g.getCoordinates()).to.eql([[-180, -90, 0], [180, 90, 0]]);
var serialized = formatWGS84.writeGeometryNode(g);
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
it('can read and write a point geometry with correct axis order',
function() {
@@ -612,8 +612,8 @@ describe('ol.format.GML3', function() {
var g = readGeometry(format, text);
expect(g).to.be.an(ol.geom.Polygon);
expect(g.getCoordinates()).to.eql([[[1, 2, 0], [3, 2, 0], [3, 4, 0],
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]]);
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]]);
var serialized = format.writeGeometryNode(g);
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
});
@@ -649,8 +649,8 @@ describe('ol.format.GML3', function() {
var g = readGeometry(format, text);
expect(g).to.be.an(ol.geom.Polygon);
expect(g.getCoordinates()).to.eql([[[1, 2, 0], [3, 2, 0], [3, 4, 0],
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]]);
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]]);
format = new ol.format.GML({srsName: 'CRS:84', surface: true});
var serialized = format.writeGeometryNode(g);
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
@@ -834,7 +834,7 @@ describe('ol.format.GML3', function() {
expect(g.getCoordinates()).to.eql([
[[[1, 2, 0], [3, 2, 0], [3, 4, 0],
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[[1, 2, 0], [3, 2, 0], [3, 4, 0], [1, 2, 0]]]]);
format = new ol.format.GML({srsName: 'CRS:84', multiSurface: false});
var serialized = format.writeGeometryNode(g);
@@ -877,7 +877,7 @@ describe('ol.format.GML3', function() {
expect(g.getCoordinates()).to.eql([
[[[1, 2, 0], [3, 2, 0], [3, 4, 0],
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[[1, 2, 0], [3, 2, 0], [3, 4, 0], [1, 2, 0]]]]);
});
@@ -983,7 +983,7 @@ describe('ol.format.GML3', function() {
expect(g.getCoordinates()).to.eql([
[[[1, 2, 0], [3, 2, 0], [3, 4, 0],
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[[1, 2, 0], [3, 2, 0], [3, 4, 0], [1, 2, 0]]]]);
var serialized = format.writeGeometryNode(g);
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
@@ -1027,7 +1027,7 @@ describe('ol.format.GML3', function() {
expect(g.getCoordinates()).to.eql([
[[[1, 2, 0], [3, 2, 0], [3, 4, 0],
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[[1, 2, 0], [3, 2, 0], [3, 4, 0], [1, 2, 0]]]]);
});
@@ -1077,7 +1077,7 @@ describe('ol.format.GML3', function() {
expect(g.getCoordinates()).to.eql([
[[[1, 2, 0], [3, 2, 0], [3, 4, 0],
[1, 2, 0]], [[2, 3, 0], [2, 5, 0], [4, 5, 0], [2, 3, 0]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[3, 4, 0], [3, 6, 0], [5, 6, 0], [3, 4, 0]]],
[[[1, 2, 0], [3, 2, 0], [3, 4, 0], [1, 2, 0]]]]);
format = new ol.format.GML({srsName: 'CRS:84', surface: true});
var serialized = format.writeGeometryNode(g);
+4 -4
View File
@@ -849,8 +849,8 @@ describe('ol.format.KML', function() {
var g = f.getGeometry();
expect(g).to.be.an(ol.geom.MultiPolygon);
expect(g.getCoordinates()).to.eql(
[[[[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]]],
[[[3, 0, 0], [3, 1, 0], [4, 1, 0], [4, 0, 0]]]]);
[[[[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]]],
[[[3, 0, 0], [3, 1, 0], [4, 1, 0], [4, 0, 0]]]]);
expect(g.get('extrude')).to.be.an('array');
expect(g.get('extrude')).to.have.length(2);
expect(g.get('extrude')[0]).to.be(false);
@@ -864,8 +864,8 @@ describe('ol.format.KML', function() {
it('can write MultiPolygon geometries', function() {
var layout = 'XYZ';
var multiPolygon = new ol.geom.MultiPolygon(
[[[[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]]],
[[[3, 0, 0], [3, 1, 0], [4, 1, 0], [4, 0, 0]]]], layout);
[[[[0, 0, 0], [0, 1, 0], [1, 1, 0], [1, 0, 0]]],
[[[3, 0, 0], [3, 1, 0], [4, 1, 0], [4, 0, 0]]]], layout);
var features = [new ol.Feature(multiPolygon)];
var node = format.writeFeaturesNode(features);
var text =
+3 -3
View File
@@ -42,7 +42,7 @@ describe('ol.format.OWS 1.1', function() {
'</ows:ServiceContact>' +
'</ows:ServiceProvider>' +
'</ows:GetCapabilities>'
);
);
var obj = parser.read(doc);
expect(obj).to.be.ok();
@@ -76,7 +76,7 @@ describe('ol.format.OWS 1.1', function() {
'<ows:AccessConstraints>none</ows:AccessConstraints>' +
'</ows:ServiceIdentification>' +
'</ows:GetCapabilities>'
);
);
var obj = parser.readFromNode(doc.firstChild);
expect(obj).to.be.ok();
@@ -129,7 +129,7 @@ describe('ol.format.OWS 1.1', function() {
'</ows:Operation>' +
'</ows:OperationsMetadata>' +
'</ows:GetCapabilities>'
);
);
var obj = parser.readFromNode(doc.firstChild);
expect(obj).to.be.ok();
+25 -25
View File
@@ -348,14 +348,14 @@ describe('ol.format.WFS', function() {
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.filter.or(
ol.format.filter.and(
ol.format.filter.greaterThan('area', 100),
ol.format.filter.greaterThanOrEqualTo('pop', 20000)
),
ol.format.filter.and(
ol.format.filter.lessThan('area', 100),
ol.format.filter.lessThanOrEqualTo('pop', 20000)
)
ol.format.filter.and(
ol.format.filter.greaterThan('area', 100),
ol.format.filter.greaterThanOrEqualTo('pop', 20000)
),
ol.format.filter.and(
ol.format.filter.lessThan('area', 100),
ol.format.filter.lessThanOrEqualTo('pop', 20000)
)
)
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
@@ -505,9 +505,9 @@ describe('ol.format.WFS', function() {
featurePrefix: 'topp',
featureTypes: ['states'],
filter: ol.format.filter.and(
ol.format.filter.equalTo('name', 'New York'),
ol.format.filter.bbox('the_geom', [1, 2, 3, 4], 'urn:ogc:def:crs:EPSG::4326'),
ol.format.filter.greaterThan('population', 2000000)
ol.format.filter.equalTo('name', 'New York'),
ol.format.filter.bbox('the_geom', [1, 2, 3, 4], 'urn:ogc:def:crs:EPSG::4326'),
ol.format.filter.greaterThan('population', 2000000)
)
});
expect(serialized.firstElementChild).to.xmleql(ol.xml.parse(text));
@@ -539,11 +539,11 @@ describe('ol.format.WFS', function() {
filter: ol.format.filter.intersects(
'the_geom',
new ol.geom.Polygon([[
[10, 20],
[10, 25],
[15, 25],
[15, 20],
[10, 20]
[10, 20],
[10, 25],
[15, 25],
[15, 20],
[10, 20]
]])
)
});
@@ -576,11 +576,11 @@ describe('ol.format.WFS', function() {
filter: ol.format.filter.within(
'the_geom',
new ol.geom.Polygon([[
[10, 20],
[10, 25],
[15, 25],
[15, 20],
[10, 20]
[10, 20],
[10, 25],
[15, 25],
[15, 20],
[10, 20]
]])
)
});
@@ -1182,10 +1182,10 @@ describe('ol.format.WFS', function() {
' </And>' +
'</Filter>';
var serialized = ol.format.WFS.writeFilter(
ol.format.filter.and(
ol.format.filter.like('name', 'Mississippi*'),
ol.format.filter.equalTo('waterway', 'riverbank')
)
ol.format.filter.and(
ol.format.filter.like('name', 'Mississippi*'),
ol.format.filter.equalTo('waterway', 'riverbank')
)
);
expect(serialized).to.xmleql(ol.xml.parse(text));
});
+13 -13
View File
@@ -28,7 +28,7 @@ describe('ol.format.WMTSCapabilities', function() {
var layer = capabilities.Contents.Layer[0];
expect(layer.Abstract).to.be
.eql('Blue Marble Next Generation NASA Product');
.eql('Blue Marble Next Generation NASA Product');
expect(layer.Identifier).to.be.eql('BlueMarbleNextGeneration');
expect(layer.Title).to.be.eql('Blue Marble Next Generation');
@@ -51,16 +51,16 @@ describe('ol.format.WMTSCapabilities', function() {
expect(layer.Style[0].isDefault).to.be(true);
expect(layer.Style[0].Title).to.be.eql('Dark Blue');
expect(layer.Style[0].LegendURL[0].href).to.be
.eql('http://www.miramon.uab.es/wmts/Coastlines/' +
.eql('http://www.miramon.uab.es/wmts/Coastlines/' +
'coastlines_darkBlue.png');
expect(layer.Style[0].LegendURL[0].format).to.be.eql('image/png');
expect(layer.TileMatrixSetLink).to.be.an('array');
expect(layer.TileMatrixSetLink).to.have.length(2);
expect(layer.TileMatrixSetLink[0].TileMatrixSet).to.be
.eql('BigWorldPixel');
.eql('BigWorldPixel');
expect(layer.TileMatrixSetLink[1].TileMatrixSet).to.be
.eql('google3857');
.eql('google3857');
var wgs84Bbox = layer.WGS84BoundingBox;
expect(wgs84Bbox).to.be.an('array');
@@ -73,7 +73,7 @@ describe('ol.format.WMTSCapabilities', function() {
expect(layer.ResourceURL).to.have.length(2);
expect(layer.ResourceURL[0].format).to.be.eql('image/png');
expect(layer.ResourceURL[0].template).to.be
.eql('http://www.example.com/wmts/coastlines/{TileMatrix}' +
.eql('http://www.example.com/wmts/coastlines/{TileMatrix}' +
'/{TileRow}/{TileCol}.png');
});
@@ -140,19 +140,19 @@ describe('ol.format.WMTSCapabilities', function() {
expect(layer.TileMatrixSetLink).to.be.an('array');
expect(layer.TileMatrixSetLink).to.have.length(1);
expect(layer.TileMatrixSetLink[0].TileMatrixSet).to.be
.eql('PM');
.eql('PM');
expect(layer.TileMatrixSetLink[0].TileMatrixSetLimits).to.be.an('array');
expect(layer.TileMatrixSetLink[0].TileMatrixSetLimits).to.have.length(20);
expect(layer.TileMatrixSetLink[0].TileMatrixSetLimits[0].TileMatrix)
.to.be.eql('0');
.to.be.eql('0');
expect(layer.TileMatrixSetLink[0].TileMatrixSetLimits[0].MinTileRow)
.to.be.eql(0);
.to.be.eql(0);
expect(layer.TileMatrixSetLink[0].TileMatrixSetLimits[0].MaxTileRow)
.to.be.eql(1);
.to.be.eql(1);
expect(layer.TileMatrixSetLink[0].TileMatrixSetLimits[0].MinTileCol)
.to.be.eql(0);
.to.be.eql(0);
expect(layer.TileMatrixSetLink[0].TileMatrixSetLimits[0].MaxTileCol)
.to.be.eql(1);
.to.be.eql(1);
});
@@ -168,7 +168,7 @@ describe('ol.format.WMTSCapabilities', function() {
expect(pm.TileMatrix[0].MatrixHeight).to.be.eql(1);
expect(pm.TileMatrix[0].MatrixWidth).to.be.eql(1);
expect(pm.TileMatrix[0].ScaleDenominator)
.to.be.eql(559082264.0287178958533332);
.to.be.eql(559082264.0287178958533332);
expect(pm.TileMatrix[0].TileWidth).to.be.eql(256);
expect(pm.TileMatrix[0].TileHeight).to.be.eql(256);
expect(pm.TileMatrix[0].TopLeftCorner).to.be.a('array');
@@ -178,7 +178,7 @@ describe('ol.format.WMTSCapabilities', function() {
expect(pm.TileMatrix[1].MatrixHeight).to.be.eql(2);
expect(pm.TileMatrix[1].MatrixWidth).to.be.eql(2);
expect(pm.TileMatrix[1].ScaleDenominator)
.to.be.eql(279541132.0143588959472254);
.to.be.eql(279541132.0143588959472254);
expect(pm.TileMatrix[1].TileWidth).to.be.eql(256);
expect(pm.TileMatrix[1].TileHeight).to.be.eql(256);
expect(pm.TileMatrix[1].TopLeftCorner).to.be.a('array');