From 7b7788973b2b41925ceb3d798c6b68d69bbf98dc Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 22 Jul 2014 14:40:22 +0200 Subject: [PATCH 1/3] Remove unnecessary newlines --- src/ol/control/attributioncontrol.js | 3 +-- src/ol/interaction/dragboxinteraction.js | 6 ++---- src/ol/interaction/dragpaninteraction.js | 6 ++---- src/ol/interaction/interaction.js | 3 +-- src/ol/map.js | 6 ++---- 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/ol/control/attributioncontrol.js b/src/ol/control/attributioncontrol.js index dd1bf98036..d12e054404 100644 --- a/src/ol/control/attributioncontrol.js +++ b/src/ol/control/attributioncontrol.js @@ -158,8 +158,7 @@ goog.inherits(ol.control.Attribution, ol.control.Control); * @param {?olx.FrameState} frameState Frame state. * @return {Array.>} Attributions. */ -ol.control.Attribution.prototype.getSourceAttributions = - function(frameState) { +ol.control.Attribution.prototype.getSourceAttributions = function(frameState) { var i, ii, j, jj, tileRanges, source, sourceAttribution, sourceAttributionKey, sourceAttributions, sourceKey; var layerStatesArray = frameState.layerStatesArray; diff --git a/src/ol/interaction/dragboxinteraction.js b/src/ol/interaction/dragboxinteraction.js index 3a455e0ded..0bb34da53e 100644 --- a/src/ol/interaction/dragboxinteraction.js +++ b/src/ol/interaction/dragboxinteraction.js @@ -152,8 +152,7 @@ ol.interaction.DragBox.prototype.onBoxEnd = goog.nullFunction; /** * @inheritDoc */ -ol.interaction.DragBox.prototype.handlePointerUp = - function(mapBrowserEvent) { +ol.interaction.DragBox.prototype.handlePointerUp = function(mapBrowserEvent) { if (!ol.events.condition.mouseOnly(mapBrowserEvent)) { return true; } @@ -176,8 +175,7 @@ ol.interaction.DragBox.prototype.handlePointerUp = /** * @inheritDoc */ -ol.interaction.DragBox.prototype.handlePointerDown = - function(mapBrowserEvent) { +ol.interaction.DragBox.prototype.handlePointerDown = function(mapBrowserEvent) { if (!ol.events.condition.mouseOnly(mapBrowserEvent)) { return false; } diff --git a/src/ol/interaction/dragpaninteraction.js b/src/ol/interaction/dragpaninteraction.js index a1c8efbe58..ec90c4623b 100644 --- a/src/ol/interaction/dragpaninteraction.js +++ b/src/ol/interaction/dragpaninteraction.js @@ -91,8 +91,7 @@ ol.interaction.DragPan.prototype.handlePointerDrag = function(mapBrowserEvent) { /** * @inheritDoc */ -ol.interaction.DragPan.prototype.handlePointerUp = - function(mapBrowserEvent) { +ol.interaction.DragPan.prototype.handlePointerUp = function(mapBrowserEvent) { var map = mapBrowserEvent.map; var view = map.getView(); if (this.targetPointers.length === 0) { @@ -124,8 +123,7 @@ ol.interaction.DragPan.prototype.handlePointerUp = /** * @inheritDoc */ -ol.interaction.DragPan.prototype.handlePointerDown = - function(mapBrowserEvent) { +ol.interaction.DragPan.prototype.handlePointerDown = function(mapBrowserEvent) { if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) { var map = mapBrowserEvent.map; var view = map.getView(); diff --git a/src/ol/interaction/interaction.js b/src/ol/interaction/interaction.js index 0899e56141..11acb63db1 100644 --- a/src/ol/interaction/interaction.js +++ b/src/ol/interaction/interaction.js @@ -74,8 +74,7 @@ ol.interaction.Interaction.prototype.setMap = function(map) { * @param {ol.Coordinate} delta Delta. * @param {number=} opt_duration Duration. */ -ol.interaction.Interaction.pan = function( - map, view, delta, opt_duration) { +ol.interaction.Interaction.pan = function(map, view, delta, opt_duration) { var currentCenter = view.getCenter(); if (goog.isDef(currentCenter)) { if (goog.isDef(opt_duration) && opt_duration > 0) { diff --git a/src/ol/map.js b/src/ol/map.js index ba31cff730..5b52b621ce 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -689,8 +689,7 @@ ol.Map.prototype.getInteractions = function() { * @api stable */ ol.Map.prototype.getLayerGroup = function() { - return /** @type {ol.layer.Group} */ ( - this.get(ol.MapProperty.LAYERGROUP)); + return /** @type {ol.layer.Group} */ (this.get(ol.MapProperty.LAYERGROUP)); }; goog.exportProperty( ol.Map.prototype, @@ -1357,8 +1356,7 @@ ol.Map.prototype.updateSize = function() { /** * @type {Element} */ - var targetElement = goog.isDef(target) ? - goog.dom.getElement(target) : null; + var targetElement = goog.isDef(target) ? goog.dom.getElement(target) : null; if (goog.isNull(targetElement)) { this.setSize(undefined); From 8cf48eac4f59b0050f448f57bd7c11747767e050 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 22 Jul 2014 15:11:40 +0200 Subject: [PATCH 2/3] Document options default value --- externs/olx.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 501d3c1731..f00d92a889 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -1686,7 +1686,7 @@ olx.interaction.DrawOptions.prototype.source; /** - * Pixel distance for snapping to the drawing finish (default is 12). + * Pixel distance for snapping to the drawing finish. Default is `12`. * @type {number|undefined} */ olx.interaction.DrawOptions.prototype.snapTolerance; @@ -1701,8 +1701,8 @@ olx.interaction.DrawOptions.prototype.type; /** - * The number of points that must be drawn before a polygon ring can be finished - * (default is 3). + * The number of points that must be drawn before a polygon ring can be finished. + * Default is `3`. * @type {number|undefined} */ olx.interaction.DrawOptions.prototype.minPointsPerRing; @@ -1810,7 +1810,7 @@ olx.interaction.ModifyOptions.prototype.deleteCondition; /** * Pixel tolerance for considering the pointer close enough to a segment or - * vertex for editing. Default is 10 pixels. + * vertex for editing. Default is `10` pixels. * @type {number|undefined} */ olx.interaction.ModifyOptions.prototype.pixelTolerance; @@ -4299,14 +4299,14 @@ olx.source.WMTSOptions.prototype.tilePixelRatio; /** - * WMTS version. Default to `1.0.0`. + * WMTS version. Default is `1.0.0`. * @type {string|undefined} */ olx.source.WMTSOptions.prototype.version; /** - * Format. + * Image format. Default is `image/jpeg`. * @type {string|undefined} */ olx.source.WMTSOptions.prototype.format; From a8961877e8e28085b74d8ec851958c3bbf72a6a8 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 22 Jul 2014 15:21:27 +0200 Subject: [PATCH 3/3] Add link to the OSM XML documentation --- src/ol/format/osmxmlformat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/format/osmxmlformat.js b/src/ol/format/osmxmlformat.js index 77dacd531d..456247d47d 100644 --- a/src/ol/format/osmxmlformat.js +++ b/src/ol/format/osmxmlformat.js @@ -17,7 +17,8 @@ goog.require('ol.xml'); /** * @classdesc - * Feature format for reading and writing data in the OSMXML format. + * Feature format for reading data in the + * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML). * * @constructor * @extends {ol.format.XMLFeature}