Rename goog.DEBUG to ol.DEBUG

This commit is contained in:
Andreas Hocevar
2016-08-28 17:02:49 +02:00
parent 92ab5a079c
commit d1e4b33760
115 changed files with 701 additions and 691 deletions

View File

@@ -194,7 +194,7 @@ ol.reproj.Image.prototype.load = function() {
* @private
*/
ol.reproj.Image.prototype.unlistenSource_ = function() {
goog.DEBUG && console.assert(this.sourceListenerKey_,
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

@@ -180,7 +180,7 @@ ol.reproj.Tile = function(sourceProj, sourceTileGrid,
sourceExtent, this.sourceZ_);
var tilesRequired = sourceRange.getWidth() * sourceRange.getHeight();
if (goog.DEBUG && !(tilesRequired < ol.RASTER_REPROJECTION_MAX_SOURCE_TILES)) {
if (ol.DEBUG && !(tilesRequired < ol.RASTER_REPROJECTION_MAX_SOURCE_TILES)) {
console.assert(false, 'reasonable number of tiles is required');
this.state = ol.Tile.State.ERROR;
return;
@@ -283,7 +283,7 @@ ol.reproj.Tile.prototype.load = function() {
var leftToLoad = 0;
goog.DEBUG && console.assert(!this.sourcesListenerKeys_,
ol.DEBUG && console.assert(!this.sourcesListenerKeys_,
'this.sourcesListenerKeys_ should be null');
this.sourcesListenerKeys_ = [];
@@ -301,7 +301,7 @@ ol.reproj.Tile.prototype.load = function() {
state == ol.Tile.State.EMPTY) {
ol.events.unlistenByKey(sourceListenKey);
leftToLoad--;
goog.DEBUG && console.assert(leftToLoad >= 0,
ol.DEBUG && console.assert(leftToLoad >= 0,
'leftToLoad should not be negative');
if (leftToLoad === 0) {
this.unlistenSources_();

View File

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