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

@@ -58,8 +58,7 @@ ol.renderer.Layer.prototype.forEachFeatureAtCoordinate = ol.nullFunction;
* @return {T|undefined} Callback result.
* @template S,T
*/
ol.renderer.Layer.prototype.forEachLayerAtPixel =
function(pixel, frameState, callback, thisArg) {
ol.renderer.Layer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
var coordinate = pixel.slice();
ol.vec.Mat4.multVec2(
frameState.pixelToCoordinateMatrix, coordinate, coordinate);
@@ -94,8 +93,7 @@ ol.renderer.Layer.prototype.hasFeatureAtCoordinate = goog.functions.FALSE;
* lookup.
* @protected
*/
ol.renderer.Layer.prototype.createLoadedTileFinder =
function(source, projection, tiles) {
ol.renderer.Layer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
return (
/**
* @param {number} zoom Zoom level.
@@ -103,13 +101,13 @@ ol.renderer.Layer.prototype.createLoadedTileFinder =
* @return {boolean} The tile range is fully loaded.
*/
function(zoom, tileRange) {
return source.forEachLoadedTile(projection, zoom,
tileRange, function(tile) {
if (!tiles[zoom]) {
tiles[zoom] = {};
}
tiles[zoom][tile.tileCoord.toString()] = tile;
});
function callback(tile) {
if (!tiles[zoom]) {
tiles[zoom] = {};
}
tiles[zoom][tile.tileCoord.toString()] = tile;
}
return source.forEachLoadedTile(projection, zoom, tileRange, callback);
});
};
@@ -182,8 +180,7 @@ ol.renderer.Layer.prototype.renderIfReadyAndVisible = function() {
* @param {ol.source.Tile} tileSource Tile source.
* @protected
*/
ol.renderer.Layer.prototype.scheduleExpireCache =
function(frameState, tileSource) {
ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSource) {
if (tileSource.canExpireCache()) {
frameState.postRenderFunctions.push(
goog.partial(
@@ -207,8 +204,7 @@ ol.renderer.Layer.prototype.scheduleExpireCache =
* @param {Array.<ol.Attribution>} attributions Attributions (source).
* @protected
*/
ol.renderer.Layer.prototype.updateAttributions =
function(attributionsSet, attributions) {
ol.renderer.Layer.prototype.updateAttributions = function(attributionsSet, attributions) {
if (attributions) {
var attribution, i, ii;
for (i = 0, ii = attributions.length; i < ii; ++i) {
@@ -245,8 +241,7 @@ ol.renderer.Layer.prototype.updateLogos = function(frameState, source) {
* @param {ol.TileRange} tileRange Tile range.
* @protected
*/
ol.renderer.Layer.prototype.updateUsedTiles =
function(usedTiles, tileSource, z, tileRange) {
ol.renderer.Layer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, tileRange) {
// FIXME should we use tilesToDrawByZ instead?
var tileSourceKey = goog.getUid(tileSource).toString();
var zKey = z.toString();
@@ -270,8 +265,7 @@ ol.renderer.Layer.prototype.updateUsedTiles =
* @protected
* @return {ol.Coordinate} Snapped center.
*/
ol.renderer.Layer.prototype.snapCenterToPixel =
function(center, resolution, size) {
ol.renderer.Layer.prototype.snapCenterToPixel = function(center, resolution, size) {
return [
resolution * (Math.round(center[0] / resolution) + (size[0] % 2) / 2),
resolution * (Math.round(center[1] / resolution) + (size[1] % 2) / 2)