Consistent spacing between keys and values in object literal
Related to https://github.com/openlayers/eslint-config-openlayers/pull/9
This commit is contained in:
@@ -168,7 +168,7 @@ ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'coordinates': ol.xml.makeReplacer(
|
||||
ol.format.GML2.prototype.readFlatCoordinates_)
|
||||
}
|
||||
@@ -181,7 +181,7 @@ ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'innerBoundaryIs': ol.format.GML2.prototype.innerBoundaryIsParser_,
|
||||
'outerBoundaryIs': ol.format.GML2.prototype.outerBoundaryIsParser_
|
||||
}
|
||||
@@ -194,7 +194,7 @@ ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML2.prototype.BOX_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'coordinates': ol.xml.makeArrayPusher(
|
||||
ol.format.GML2.prototype.readFlatCoordinates_)
|
||||
}
|
||||
@@ -207,7 +207,7 @@ ol.format.GML2.prototype.BOX_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML2.prototype.GEOMETRY_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint),
|
||||
'MultiPoint': ol.xml.makeReplacer(
|
||||
ol.format.GMLBase.prototype.readMultiPoint),
|
||||
@@ -215,7 +215,7 @@ ol.format.GML2.prototype.GEOMETRY_PARSERS_ = {
|
||||
ol.format.GMLBase.prototype.readLineString),
|
||||
'MultiLineString': ol.xml.makeReplacer(
|
||||
ol.format.GMLBase.prototype.readMultiLineString),
|
||||
'LinearRing' : ol.xml.makeReplacer(
|
||||
'LinearRing': ol.xml.makeReplacer(
|
||||
ol.format.GMLBase.prototype.readLinearRing),
|
||||
'Polygon': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPolygon),
|
||||
'MultiPolygon': ol.xml.makeReplacer(
|
||||
|
||||
@@ -446,7 +446,7 @@ ol.format.GML3.prototype.readFlatPosList_ = function(node, objectStack) {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'pos': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPos_),
|
||||
'posList': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPosList_)
|
||||
}
|
||||
@@ -459,7 +459,7 @@ ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'interior': ol.format.GML3.prototype.interiorParser_,
|
||||
'exterior': ol.format.GML3.prototype.exteriorParser_
|
||||
}
|
||||
@@ -472,7 +472,7 @@ ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint),
|
||||
'MultiPoint': ol.xml.makeReplacer(
|
||||
ol.format.GMLBase.prototype.readMultiPoint),
|
||||
@@ -480,7 +480,7 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
|
||||
ol.format.GMLBase.prototype.readLineString),
|
||||
'MultiLineString': ol.xml.makeReplacer(
|
||||
ol.format.GMLBase.prototype.readMultiLineString),
|
||||
'LinearRing' : ol.xml.makeReplacer(
|
||||
'LinearRing': ol.xml.makeReplacer(
|
||||
ol.format.GMLBase.prototype.readLinearRing),
|
||||
'Polygon': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPolygon),
|
||||
'MultiPolygon': ol.xml.makeReplacer(
|
||||
@@ -502,7 +502,7 @@ ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.MULTICURVE_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'curveMember': ol.xml.makeArrayPusher(
|
||||
ol.format.GML3.prototype.curveMemberParser_),
|
||||
'curveMembers': ol.xml.makeArrayPusher(
|
||||
@@ -517,7 +517,7 @@ ol.format.GML3.prototype.MULTICURVE_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'surfaceMember': ol.xml.makeArrayPusher(
|
||||
ol.format.GML3.prototype.surfaceMemberParser_),
|
||||
'surfaceMembers': ol.xml.makeArrayPusher(
|
||||
@@ -532,7 +532,7 @@ ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'LineString': ol.xml.makeArrayPusher(
|
||||
ol.format.GMLBase.prototype.readLineString),
|
||||
'Curve': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readCurve_)
|
||||
@@ -546,7 +546,7 @@ ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'Polygon': ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readPolygon),
|
||||
'Surface': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readSurface_)
|
||||
}
|
||||
@@ -559,7 +559,7 @@ ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.SURFACE_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'patches': ol.xml.makeReplacer(ol.format.GML3.prototype.readPatch_)
|
||||
}
|
||||
};
|
||||
@@ -571,7 +571,7 @@ ol.format.GML3.prototype.SURFACE_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.CURVE_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'segments': ol.xml.makeReplacer(ol.format.GML3.prototype.readSegment_)
|
||||
}
|
||||
};
|
||||
@@ -583,7 +583,7 @@ ol.format.GML3.prototype.CURVE_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.ENVELOPE_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'lowerCorner': ol.xml.makeArrayPusher(
|
||||
ol.format.GML3.prototype.readFlatPosList_),
|
||||
'upperCorner': ol.xml.makeArrayPusher(
|
||||
@@ -598,7 +598,7 @@ ol.format.GML3.prototype.ENVELOPE_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.PATCHES_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'PolygonPatch': ol.xml.makeReplacer(
|
||||
ol.format.GML3.prototype.readPolygonPatch_)
|
||||
}
|
||||
@@ -611,7 +611,7 @@ ol.format.GML3.prototype.PATCHES_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GML3.prototype.SEGMENTS_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'LineStringSegment': ol.xml.makeReplacer(
|
||||
ol.format.GML3.prototype.readLineStringSegment_)
|
||||
}
|
||||
|
||||
@@ -507,7 +507,7 @@ ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = function(node, object
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'pointMember': ol.xml.makeArrayPusher(
|
||||
ol.format.GMLBase.prototype.pointMemberParser_),
|
||||
'pointMembers': ol.xml.makeArrayPusher(
|
||||
@@ -522,7 +522,7 @@ ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'lineStringMember': ol.xml.makeArrayPusher(
|
||||
ol.format.GMLBase.prototype.lineStringMemberParser_),
|
||||
'lineStringMembers': ol.xml.makeArrayPusher(
|
||||
@@ -537,7 +537,7 @@ ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'polygonMember': ol.xml.makeArrayPusher(
|
||||
ol.format.GMLBase.prototype.polygonMemberParser_),
|
||||
'polygonMembers': ol.xml.makeArrayPusher(
|
||||
@@ -552,7 +552,7 @@ ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'Point': ol.xml.makeArrayPusher(
|
||||
ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_)
|
||||
}
|
||||
@@ -565,7 +565,7 @@ ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'LineString': ol.xml.makeArrayPusher(
|
||||
ol.format.GMLBase.prototype.readLineString)
|
||||
}
|
||||
@@ -578,7 +578,7 @@ ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {
|
||||
* @private
|
||||
*/
|
||||
ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'Polygon': ol.xml.makeArrayPusher(
|
||||
ol.format.GMLBase.prototype.readPolygon)
|
||||
}
|
||||
@@ -591,7 +591,7 @@ ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = {
|
||||
* @protected
|
||||
*/
|
||||
ol.format.GMLBase.prototype.RING_PARSERS = {
|
||||
'http://www.opengis.net/gml' : {
|
||||
'http://www.opengis.net/gml': {
|
||||
'LinearRing': ol.xml.makeReplacer(
|
||||
ol.format.GMLBase.prototype.readFlatLinearRing_)
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ ol.render.webgl.lineStringInstruction = {
|
||||
BEGIN_LINE: 3,
|
||||
END_LINE: 5,
|
||||
BEGIN_LINE_CAP: 7,
|
||||
END_LINE_CAP : 11,
|
||||
END_LINE_CAP: 11,
|
||||
BEVEL_FIRST: 13,
|
||||
BEVEL_SECOND: 17,
|
||||
MITER_BOTTOM: 19,
|
||||
|
||||
@@ -17,9 +17,9 @@ const examplePath = process.argv[2];
|
||||
const phantomPath = require('phantomjs-prebuilt').path;
|
||||
|
||||
const server = http.createServer(serveFiles.createFileResponseHandler({
|
||||
documentRoot : root,
|
||||
documentRoot: root,
|
||||
followSymbolicLinks: false,
|
||||
cacheTimeInSeconds : 3600
|
||||
cacheTimeInSeconds: 3600
|
||||
}));
|
||||
|
||||
server.listen(port, host, null, function() {
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
|
||||
var multiPointEsriJSON = {
|
||||
geometry: {
|
||||
'points' : [[102.0, 0.0], [103.0, 1.0]]
|
||||
'points': [[102.0, 0.0], [103.0, 1.0]]
|
||||
},
|
||||
attributes: {
|
||||
'prop0': 'value0'
|
||||
|
||||
@@ -60,7 +60,7 @@ describe('ol.renderer.canvas.Map', function() {
|
||||
}),
|
||||
style: new ol.style.Style({
|
||||
image: new ol.style.Icon({
|
||||
img : img,
|
||||
img: img,
|
||||
imgSize: [1, 1]
|
||||
})
|
||||
})
|
||||
@@ -151,13 +151,13 @@ describe('ol.renderer.canvas.Map', function() {
|
||||
];
|
||||
|
||||
for (var i = 0; i < 4; i++) {
|
||||
map.forEachFeatureAtPixel(pixelsInside[i], cb1, {hitTolerance:10});
|
||||
map.forEachFeatureAtPixel(pixelsInside[i], cb1, {hitTolerance: 10});
|
||||
}
|
||||
expect(cb1.callCount).to.be(4);
|
||||
expect(cb1.firstCall.args[1]).to.be(layer);
|
||||
|
||||
for (var j = 0; j < 4; j++) {
|
||||
map.forEachFeatureAtPixel(pixelsOutside[j], cb2, {hitTolerance:10});
|
||||
map.forEachFeatureAtPixel(pixelsOutside[j], cb2, {hitTolerance: 10});
|
||||
}
|
||||
expect(cb2).not.to.be.called();
|
||||
});
|
||||
|
||||
@@ -97,7 +97,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new ol.source.ImageArcGISRest(options);
|
||||
source.updateParams({'TEST':'newValue'});
|
||||
source.updateParams({'TEST': 'newValue'});
|
||||
|
||||
var image = source.getImage([3, 2, -7, 1], resolution, pixelRatio, proj3857);
|
||||
var uri = new URL(image.src_);
|
||||
@@ -122,22 +122,22 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new ol.source.ImageArcGISRest(options);
|
||||
source.updateParams({'TEST2':'newValue'});
|
||||
source.updateParams({'TEST2': 'newValue'});
|
||||
|
||||
var setParams = source.getParams();
|
||||
|
||||
expect(setParams).to.eql({TEST:'value', TEST2:'newValue'});
|
||||
expect(setParams).to.eql({TEST: 'value', TEST2: 'newValue'});
|
||||
});
|
||||
|
||||
it('verify on update a param', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new ol.source.ImageArcGISRest(options);
|
||||
source.updateParams({'TEST':'newValue'});
|
||||
source.updateParams({'TEST': 'newValue'});
|
||||
|
||||
var setParams = source.getParams();
|
||||
|
||||
expect(setParams).to.eql({TEST:'newValue'});
|
||||
expect(setParams).to.eql({TEST: 'newValue'});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user