Satisfy JSLint
JSLint complains about functions being declared in blocks.
This commit is contained in:
@@ -129,9 +129,9 @@ ol.renderer.canvas.TileLayer.prototype.renderFrame =
|
|||||||
var tilesToDrawByZ = {};
|
var tilesToDrawByZ = {};
|
||||||
tilesToDrawByZ[z] = {};
|
tilesToDrawByZ[z] = {};
|
||||||
|
|
||||||
function isLoaded(tile) {
|
var isLoaded = function(tile) {
|
||||||
return !goog.isNull(tile) && tile.getState() == ol.TileState.LOADED;
|
return !goog.isNull(tile) && tile.getState() == ol.TileState.LOADED;
|
||||||
}
|
};
|
||||||
var findLoadedTiles = goog.bind(tileSource.findLoadedTiles, tileSource,
|
var findLoadedTiles = goog.bind(tileSource.findLoadedTiles, tileSource,
|
||||||
tilesToDrawByZ, isLoaded);
|
tilesToDrawByZ, isLoaded);
|
||||||
|
|
||||||
|
|||||||
@@ -93,9 +93,9 @@ ol.renderer.dom.TileLayer.prototype.renderFrame =
|
|||||||
var tilesToDrawByZ = {};
|
var tilesToDrawByZ = {};
|
||||||
tilesToDrawByZ[z] = {};
|
tilesToDrawByZ[z] = {};
|
||||||
|
|
||||||
function isLoaded(tile) {
|
var isLoaded = function(tile) {
|
||||||
return !goog.isNull(tile) && tile.getState() == ol.TileState.LOADED;
|
return !goog.isNull(tile) && tile.getState() == ol.TileState.LOADED;
|
||||||
}
|
};
|
||||||
var findLoadedTiles = goog.bind(tileSource.findLoadedTiles, tileSource,
|
var findLoadedTiles = goog.bind(tileSource.findLoadedTiles, tileSource,
|
||||||
tilesToDrawByZ, isLoaded);
|
tilesToDrawByZ, isLoaded);
|
||||||
|
|
||||||
|
|||||||
@@ -365,10 +365,10 @@ ol.renderer.webgl.TileLayer.prototype.renderFrame =
|
|||||||
var tilesToDrawByZ = {};
|
var tilesToDrawByZ = {};
|
||||||
tilesToDrawByZ[z] = {};
|
tilesToDrawByZ[z] = {};
|
||||||
|
|
||||||
function isLoaded(tile) {
|
var isLoaded = function(tile) {
|
||||||
return !goog.isNull(tile) && tile.getState() == ol.TileState.LOADED &&
|
return !goog.isNull(tile) && tile.getState() == ol.TileState.LOADED &&
|
||||||
mapRenderer.isTileTextureLoaded(tile);
|
mapRenderer.isTileTextureLoaded(tile);
|
||||||
}
|
};
|
||||||
var findLoadedTiles = goog.bind(tileSource.findLoadedTiles, tileSource,
|
var findLoadedTiles = goog.bind(tileSource.findLoadedTiles, tileSource,
|
||||||
tilesToDrawByZ, isLoaded);
|
tilesToDrawByZ, isLoaded);
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ ol.source.TiledWMS = function(tiledWMSOptions) {
|
|||||||
tileUrlFunction = ol.TileUrlFunction.nullTileUrlFunction;
|
tileUrlFunction = ol.TileUrlFunction.nullTileUrlFunction;
|
||||||
}
|
}
|
||||||
|
|
||||||
function tileCoordTransform(tileCoord) {
|
var tileCoordTransform = function(tileCoord) {
|
||||||
if (tileGrid.getResolutions().length <= tileCoord.z) {
|
if (tileGrid.getResolutions().length <= tileCoord.z) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ ol.source.TiledWMS = function(tiledWMSOptions) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return new ol.TileCoord(tileCoord.z, x, tileCoord.y);
|
return new ol.TileCoord(tileCoord.z, x, tileCoord.y);
|
||||||
}
|
};
|
||||||
|
|
||||||
goog.base(this, {
|
goog.base(this, {
|
||||||
attributions: tiledWMSOptions.attributions,
|
attributions: tiledWMSOptions.attributions,
|
||||||
|
|||||||
Reference in New Issue
Block a user