Merge pull request #2421 from fredj/misc
miscellaneous documentation and coding style fixes
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -158,8 +158,7 @@ goog.inherits(ol.control.Attribution, ol.control.Control);
|
||||
* @param {?olx.FrameState} frameState Frame state.
|
||||
* @return {Array.<Object.<string, ol.Attribution>>} 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;
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user