Remove ol.DEBUG

This commit is contained in:
Tim Schaub
2016-12-29 09:09:24 -07:00
parent 7b9690a691
commit 137cdc04c8
128 changed files with 309 additions and 2027 deletions

View File

@@ -194,8 +194,6 @@ ol.reproj.Image.prototype.load = function() {
* @private
*/
ol.reproj.Image.prototype.unlistenSource_ = function() {
ol.DEBUG && console.assert(this.sourceListenerKey_,
'this.sourceListenerKey_ should not be null');
ol.events.unlistenByKey(/** @type {!ol.EventsKey} */ (this.sourceListenerKey_));
this.sourceListenerKey_ = null;
};

View File

@@ -173,12 +173,6 @@ ol.reproj.Tile = function(sourceProj, sourceTileGrid,
var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(
sourceExtent, this.sourceZ_);
var tilesRequired = sourceRange.getWidth() * sourceRange.getHeight();
if (ol.DEBUG && !(tilesRequired < ol.RASTER_REPROJECTION_MAX_SOURCE_TILES)) {
console.assert(false, 'reasonable number of tiles is required');
this.state = ol.TileState.ERROR;
return;
}
for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {
for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {
var tile = getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio);
@@ -263,9 +257,6 @@ ol.reproj.Tile.prototype.load = function() {
var leftToLoad = 0;
ol.DEBUG && console.assert(!this.sourcesListenerKeys_,
'this.sourcesListenerKeys_ should be null');
this.sourcesListenerKeys_ = [];
this.sourceTiles_.forEach(function(tile, i, arr) {
var state = tile.getState();
@@ -281,8 +272,6 @@ ol.reproj.Tile.prototype.load = function() {
state == ol.TileState.EMPTY) {
ol.events.unlistenByKey(sourceListenKey);
leftToLoad--;
ol.DEBUG && console.assert(leftToLoad >= 0,
'leftToLoad should not be negative');
if (leftToLoad === 0) {
this.unlistenSources_();
this.reproject_();

View File

@@ -115,10 +115,6 @@ ol.reproj.Triangulation = function(sourceProj, targetProj, targetExtent,
ol.RASTER_REPROJECTION_MAX_SUBDIVISION);
if (this.wrapsXInSource_) {
// Fix coordinates (ol.proj returns wrapped coordinates, "unwrap" here).
// This significantly simplifies the rest of the reprojection process.
ol.DEBUG && console.assert(this.sourceWorldWidth_ !== null);
var leftBound = Infinity;
this.triangles_.forEach(function(triangle, i, arr) {
leftBound = Math.min(leftBound,