Merge pull request #6243 from fredj/key-spacing

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