Use goog.DEBUG instead of ol.DEBUG for now

This commit is contained in:
Andreas Hocevar
2016-08-04 09:37:42 +02:00
parent 55ab5704d4
commit e0015b3d4e
121 changed files with 712 additions and 721 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ ol.reproj.Image.prototype.load = function() {
* @private
*/
ol.reproj.Image.prototype.unlistenSource_ = function() {
ol.DEBUG && console.assert(this.sourceListenerKey_,
goog.DEBUG && console.assert(this.sourceListenerKey_,
'this.sourceListenerKey_ should not be null');
ol.events.unlistenByKey(/** @type {!ol.EventsKey} */ (this.sourceListenerKey_));
this.sourceListenerKey_ = null;
+4 -4
View File
@@ -181,7 +181,7 @@ ol.reproj.Tile = function(sourceProj, sourceTileGrid,
sourceExtent, this.sourceZ_);
var tilesRequired = sourceRange.getWidth() * sourceRange.getHeight();
if (ol.DEBUG && !(tilesRequired < ol.RASTER_REPROJECTION_MAX_SOURCE_TILES)) {
if (goog.DEBUG && !(tilesRequired < ol.RASTER_REPROJECTION_MAX_SOURCE_TILES)) {
console.assert(false, 'reasonable number of tiles is required');
this.state = ol.TileState.ERROR;
return;
@@ -284,7 +284,7 @@ ol.reproj.Tile.prototype.load = function() {
var leftToLoad = 0;
ol.DEBUG && console.assert(!this.sourcesListenerKeys_,
goog.DEBUG && console.assert(!this.sourcesListenerKeys_,
'this.sourcesListenerKeys_ should be null');
this.sourcesListenerKeys_ = [];
@@ -302,7 +302,7 @@ ol.reproj.Tile.prototype.load = function() {
state == ol.TileState.EMPTY) {
ol.events.unlistenByKey(sourceListenKey);
leftToLoad--;
ol.DEBUG && console.assert(leftToLoad >= 0,
goog.DEBUG && console.assert(leftToLoad >= 0,
'leftToLoad should not be negative');
if (leftToLoad === 0) {
this.unlistenSources_();
@@ -332,7 +332,7 @@ ol.reproj.Tile.prototype.load = function() {
* @private
*/
ol.reproj.Tile.prototype.unlistenSources_ = function() {
ol.DEBUG && console.assert(this.sourcesListenerKeys_,
goog.DEBUG && console.assert(this.sourcesListenerKeys_,
'this.sourcesListenerKeys_ should not be null');
this.sourcesListenerKeys_.forEach(ol.events.unlistenByKey);
this.sourcesListenerKeys_ = null;
+1 -1
View File
@@ -117,7 +117,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.
ol.DEBUG && console.assert(this.sourceWorldWidth_ !== null);
goog.DEBUG && console.assert(this.sourceWorldWidth_ !== null);
var leftBound = Infinity;
this.triangles_.forEach(function(triangle, i, arr) {
leftBound = Math.min(leftBound,