Prefer single line assignment to 80 character limit

This commit is contained in:
Tim Schaub
2016-01-09 12:16:11 -07:00
parent 59a66c7aaa
commit 3cf8618fc7
105 changed files with 445 additions and 835 deletions

View File

@@ -79,8 +79,7 @@ ol.source.BingMaps.TOS_ATTRIBUTION = new ol.Attribution({
/**
* @param {BingMapsImageryMetadataResponse} response Response.
*/
ol.source.BingMaps.prototype.handleImageryMetadataResponse =
function(response) {
ol.source.BingMaps.prototype.handleImageryMetadataResponse = function(response) {
if (response.statusCode != 200 ||
response.statusDescription != 'OK' ||

View File

@@ -59,8 +59,7 @@ goog.inherits(ol.source.ImageCanvas, ol.source.Image);
/**
* @inheritDoc
*/
ol.source.ImageCanvas.prototype.getImageInternal =
function(extent, resolution, pixelRatio, projection) {
ol.source.ImageCanvas.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
resolution = this.findNearestResolution(resolution);
var canvas = this.canvas_;

View File

@@ -117,8 +117,7 @@ ol.source.ImageMapGuide.prototype.getParams = function() {
/**
* @inheritDoc
*/
ol.source.ImageMapGuide.prototype.getImageInternal =
function(extent, resolution, pixelRatio, projection) {
ol.source.ImageMapGuide.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
resolution = this.findNearestResolution(resolution);
pixelRatio = this.hidpi_ ? pixelRatio : 1;
@@ -207,8 +206,7 @@ ol.source.ImageMapGuide.prototype.updateParams = function(params) {
* @param {ol.proj.Projection} projection Projection.
* @return {string} The mapagent map image request URL.
*/
ol.source.ImageMapGuide.prototype.getUrl =
function(baseUrl, params, extent, size, projection) {
ol.source.ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, projection) {
var scale = ol.source.ImageMapGuide.getScale(extent, size,
this.metersPerUnit_, this.displayDpi_);
var center = ol.extent.getCenter(extent);

View File

@@ -89,8 +89,7 @@ ol.source.Image.prototype.getResolutions = function() {
* @param {number} resolution Resolution.
* @return {number} Resolution.
*/
ol.source.Image.prototype.findNearestResolution =
function(resolution) {
ol.source.Image.prototype.findNearestResolution = function(resolution) {
if (this.resolutions_) {
var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
resolution = this.resolutions_[idx];
@@ -106,8 +105,7 @@ ol.source.Image.prototype.findNearestResolution =
* @param {ol.proj.Projection} projection Projection.
* @return {ol.ImageBase} Single image.
*/
ol.source.Image.prototype.getImage =
function(extent, resolution, pixelRatio, projection) {
ol.source.Image.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
var sourceProjection = this.getProjection();
if (!ol.ENABLE_RASTER_REPROJECTION ||
!sourceProjection ||

View File

@@ -63,8 +63,7 @@ goog.inherits(ol.source.ImageStatic, ol.source.Image);
/**
* @inheritDoc
*/
ol.source.ImageStatic.prototype.getImageInternal =
function(extent, resolution, pixelRatio, projection) {
ol.source.ImageStatic.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
if (ol.extent.intersects(extent, this.image_.getExtent())) {
return this.image_;
}

View File

@@ -106,8 +106,7 @@ goog.inherits(ol.source.ImageVector, ol.source.ImageCanvas);
* @return {HTMLCanvasElement} Canvas element.
* @private
*/
ol.source.ImageVector.prototype.canvasFunctionInternal_ =
function(extent, resolution, pixelRatio, size, projection) {
ol.source.ImageVector.prototype.canvasFunctionInternal_ = function(extent, resolution, pixelRatio, size, projection) {
var replayGroup = new ol.render.canvas.ReplayGroup(
ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
@@ -217,8 +216,7 @@ ol.source.ImageVector.prototype.getStyleFunction = function() {
* @return {!goog.vec.Mat4.Number} Transform.
* @private
*/
ol.source.ImageVector.prototype.getTransform_ =
function(center, resolution, pixelRatio, size) {
ol.source.ImageVector.prototype.getTransform_ = function(center, resolution, pixelRatio, size) {
return ol.vec.Mat4.makeTransform2D(this.transform_,
size[0] / 2, size[1] / 2,
pixelRatio / resolution, -pixelRatio / resolution,
@@ -232,8 +230,7 @@ ol.source.ImageVector.prototype.getTransform_ =
* @param {goog.events.Event} event Image style change event.
* @private
*/
ol.source.ImageVector.prototype.handleImageChange_ =
function(event) {
ol.source.ImageVector.prototype.handleImageChange_ = function(event) {
this.changed();
};
@@ -256,8 +253,7 @@ ol.source.ImageVector.prototype.handleSourceChange_ = function() {
* @return {boolean} `true` if an image is loading.
* @private
*/
ol.source.ImageVector.prototype.renderFeature_ =
function(feature, resolution, pixelRatio, replayGroup) {
ol.source.ImageVector.prototype.renderFeature_ = function(feature, resolution, pixelRatio, replayGroup) {
var styles;
var styleFunction = feature.getStyleFunction();
if (styleFunction) {

View File

@@ -136,8 +136,7 @@ ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_ = [101, 101];
* @return {string|undefined} GetFeatureInfo URL.
* @api stable
*/
ol.source.ImageWMS.prototype.getGetFeatureInfoUrl =
function(coordinate, resolution, projection, params) {
ol.source.ImageWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
goog.asserts.assert(!('VERSION' in params),
'key VERSION is not allowed in params');
@@ -185,8 +184,7 @@ ol.source.ImageWMS.prototype.getParams = function() {
/**
* @inheritDoc
*/
ol.source.ImageWMS.prototype.getImageInternal =
function(extent, resolution, pixelRatio, projection) {
ol.source.ImageWMS.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
if (this.url_ === undefined) {
return null;
@@ -271,8 +269,7 @@ ol.source.ImageWMS.prototype.getImageLoadFunction = function() {
* @return {string} Request URL.
* @private
*/
ol.source.ImageWMS.prototype.getRequestUrl_ =
function(extent, size, pixelRatio, projection, params) {
ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio, projection, params) {
goog.asserts.assert(this.url_ !== undefined, 'url is defined');

View File

@@ -169,8 +169,7 @@ ol.source.Raster.prototype.setOperation = function(operation, opt_lib) {
* @return {olx.FrameState} The updated frame state.
* @private
*/
ol.source.Raster.prototype.updateFrameState_ =
function(extent, resolution, projection) {
ol.source.Raster.prototype.updateFrameState_ = function(extent, resolution, projection) {
var frameState = /** @type {olx.FrameState} */ (
goog.object.clone(this.frameState_));
@@ -214,8 +213,7 @@ ol.source.Raster.prototype.isDirty_ = function(extent, resolution) {
/**
* @inheritDoc
*/
ol.source.Raster.prototype.getImage =
function(extent, resolution, pixelRatio, projection) {
ol.source.Raster.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
if (!this.allSourcesReady_()) {
return null;
@@ -315,8 +313,7 @@ ol.source.Raster.prototype.composeFrame_ = function(frameState, callback) {
* @param {Object} data The user data.
* @private
*/
ol.source.Raster.prototype.onWorkerComplete_ =
function(frameState, callback, err, output, data) {
ol.source.Raster.prototype.onWorkerComplete_ = function(frameState, callback, err, output, data) {
if (err) {
callback(err);
return;

View File

@@ -86,8 +86,7 @@ ol.source.TileArcGISRest.prototype.getParams = function() {
* @return {string|undefined} Request URL.
* @private
*/
ol.source.TileArcGISRest.prototype.getRequestUrl_ =
function(tileCoord, tileSize, tileExtent,
ol.source.TileArcGISRest.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
pixelRatio, projection, params) {
var urls = this.urls;
@@ -146,8 +145,7 @@ ol.source.TileArcGISRest.prototype.getTilePixelRatio = function(pixelRatio) {
* @return {string|undefined} Tile URL.
* @private
*/
ol.source.TileArcGISRest.prototype.tileUrlFunction_ =
function(tileCoord, pixelRatio, projection) {
ol.source.TileArcGISRest.prototype.tileUrlFunction_ = function(tileCoord, pixelRatio, projection) {
var tileGrid = this.getTileGrid();
if (!tileGrid) {

View File

@@ -172,8 +172,7 @@ ol.source.TileImage.prototype.getTileCacheForProjection = function(projection) {
* @return {ol.Tile} Tile.
* @private
*/
ol.source.TileImage.prototype.createTile_ =
function(z, x, y, pixelRatio, projection, key) {
ol.source.TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) {
var tileCoord = [z, x, y];
var urlTileCoord = this.getTileCoordForTileUrlFunction(
tileCoord, projection);
@@ -195,8 +194,7 @@ ol.source.TileImage.prototype.createTile_ =
/**
* @inheritDoc
*/
ol.source.TileImage.prototype.getTile =
function(z, x, y, pixelRatio, projection) {
ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) {
if (!ol.ENABLE_RASTER_REPROJECTION ||
!this.getProjection() ||
!projection ||
@@ -239,8 +237,7 @@ ol.source.TileImage.prototype.getTile =
* @return {!ol.Tile} Tile.
* @protected
*/
ol.source.TileImage.prototype.getTileInternal =
function(z, x, y, pixelRatio, projection) {
ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
var /** @type {ol.Tile} */ tile = null;
var tileCoordKey = this.getKeyZXY(z, x, y);
var paramsKey = this.getKeyParams();
@@ -313,8 +310,7 @@ ol.source.TileImage.prototype.setRenderReprojectionEdges = function(render) {
* @param {ol.tilegrid.TileGrid} tilegrid Tile grid to use for the projection.
* @api
*/
ol.source.TileImage.prototype.setTileGridForProjection =
function(projection, tilegrid) {
ol.source.TileImage.prototype.setTileGridForProjection = function(projection, tilegrid) {
if (ol.ENABLE_RASTER_REPROJECTION) {
var proj = ol.proj.get(projection);
if (proj) {

View File

@@ -119,8 +119,7 @@ ol.source.Tile.prototype.expireCache = function(projection, usedTiles) {
* considered loaded.
* @return {boolean} The tile range is fully covered with loaded tiles.
*/
ol.source.Tile.prototype.forEachLoadedTile =
function(projection, z, tileRange, callback) {
ol.source.Tile.prototype.forEachLoadedTile = function(projection, z, tileRange, callback) {
var tileCache = this.getTileCacheForProjection(projection);
if (!tileCache) {
return false;
@@ -257,8 +256,7 @@ ol.source.Tile.prototype.getTilePixelRatio = function(pixelRatio) {
* @param {ol.proj.Projection} projection Projection.
* @return {ol.Size} Tile size.
*/
ol.source.Tile.prototype.getTilePixelSize =
function(z, pixelRatio, projection) {
ol.source.Tile.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
var tileGrid = this.getTileGridForProjection(projection);
var tilePixelRatio = this.getTilePixelRatio(pixelRatio);
var tileSize = ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize);
@@ -279,8 +277,7 @@ ol.source.Tile.prototype.getTilePixelSize =
* @return {ol.TileCoord} Tile coordinate to be passed to the tileUrlFunction or
* null if no tile URL should be created for the passed `tileCoord`.
*/
ol.source.Tile.prototype.getTileCoordForTileUrlFunction =
function(tileCoord, opt_projection) {
ol.source.Tile.prototype.getTileCoordForTileUrlFunction = function(tileCoord, opt_projection) {
var projection = opt_projection !== undefined ?
opt_projection : this.getProjection();
var tileGrid = this.getTileGridForProjection(projection);

View File

@@ -166,8 +166,7 @@ ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
/**
* @inheritDoc
*/
ol.source.TileUTFGrid.prototype.getTile =
function(z, x, y, pixelRatio, projection) {
ol.source.TileUTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) {
var tileCoordKey = this.getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
@@ -211,8 +210,7 @@ ol.source.TileUTFGrid.prototype.useTile = function(z, x, y) {
* @param {boolean} preemptive Load the tile when visible (before it's needed).
* @private
*/
ol.source.TileUTFGridTile_ =
function(tileCoord, state, src, extent, preemptive) {
ol.source.TileUTFGridTile_ = function(tileCoord, state, src, extent, preemptive) {
goog.base(this, tileCoord, state);
@@ -309,8 +307,7 @@ ol.source.TileUTFGridTile_.prototype.getData = function(coordinate) {
* The tile data is requested if not yet loaded.
* @template T
*/
ol.source.TileUTFGridTile_.prototype.forDataAtCoordinate =
function(coordinate, callback, opt_this, opt_request) {
ol.source.TileUTFGridTile_.prototype.forDataAtCoordinate = function(coordinate, callback, opt_this, opt_request) {
if (this.state == ol.TileState.IDLE && opt_request === true) {
goog.events.listenOnce(this, goog.events.EventType.CHANGE, function(e) {
callback.call(opt_this, this.getData(coordinate));

View File

@@ -117,8 +117,7 @@ goog.inherits(ol.source.TileWMS, ol.source.TileImage);
* @return {string|undefined} GetFeatureInfo URL.
* @api stable
*/
ol.source.TileWMS.prototype.getGetFeatureInfoUrl =
function(coordinate, resolution, projection, params) {
ol.source.TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
goog.asserts.assert(!('VERSION' in params),
'key VERSION is not allowed in params');
@@ -207,8 +206,7 @@ ol.source.TileWMS.prototype.getParams = function() {
* @return {string|undefined} Request URL.
* @private
*/
ol.source.TileWMS.prototype.getRequestUrl_ =
function(tileCoord, tileSize, tileExtent,
ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
pixelRatio, projection, params) {
var urls = this.urls;
@@ -312,8 +310,7 @@ ol.source.TileWMS.prototype.resetCoordKeyPrefix_ = function() {
* @return {string|undefined} Tile URL.
* @private
*/
ol.source.TileWMS.prototype.tileUrlFunction_ =
function(tileCoord, pixelRatio, projection) {
ol.source.TileWMS.prototype.tileUrlFunction_ = function(tileCoord, pixelRatio, projection) {
var tileGrid = this.getTileGrid();
if (!tileGrid) {

View File

@@ -447,8 +447,7 @@ ol.source.Vector.prototype.forEachFeature = function(callback, opt_this) {
* @return {S|undefined} The return value from the last call to the callback.
* @template T,S
*/
ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect =
function(coordinate, callback, opt_this) {
ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, callback, opt_this) {
var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
return this.forEachFeatureInExtent(extent, function(feature) {
var geometry = feature.getGeometry();
@@ -483,8 +482,7 @@ ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect =
* @template T,S
* @api
*/
ol.source.Vector.prototype.forEachFeatureInExtent =
function(extent, callback, opt_this) {
ol.source.Vector.prototype.forEachFeatureInExtent = function(extent, callback, opt_this) {
if (this.featuresRtree_) {
return this.featuresRtree_.forEachInExtent(extent, callback, opt_this);
} else if (this.featuresCollection_) {
@@ -510,8 +508,7 @@ ol.source.Vector.prototype.forEachFeatureInExtent =
* @template T,S
* @api
*/
ol.source.Vector.prototype.forEachFeatureIntersectingExtent =
function(extent, callback, opt_this) {
ol.source.Vector.prototype.forEachFeatureIntersectingExtent = function(extent, callback, opt_this) {
return this.forEachFeatureInExtent(extent,
/**
* @param {ol.Feature} feature Feature.
@@ -608,8 +605,7 @@ ol.source.Vector.prototype.getFeaturesInExtent = function(extent) {
* @return {ol.Feature} Closest feature.
* @api stable
*/
ol.source.Vector.prototype.getClosestFeatureToCoordinate =
function(coordinate) {
ol.source.Vector.prototype.getClosestFeatureToCoordinate = function(coordinate) {
// Find the closest feature using branch and bound. We start searching an
// infinite extent, and find the distance from the first feature found. This
// becomes the closest feature. We then compute a smaller extent which any

View File

@@ -67,8 +67,7 @@ goog.inherits(ol.source.VectorTile, ol.source.UrlTile);
/**
* @inheritDoc
*/
ol.source.VectorTile.prototype.getTile =
function(z, x, y, pixelRatio, projection) {
ol.source.VectorTile.prototype.getTile = function(z, x, y, pixelRatio, projection) {
var tileCoordKey = this.getKeyZXY(z, x, y);
if (this.tileCache.containsKey(tileCoordKey)) {
return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));