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

View File

@@ -119,7 +119,7 @@ ol.renderer.webgl.ImageLayer.prototype.prepareFrame = function(frameState, layer
if (!ol.ENABLE_RASTER_REPROJECTION) {
var sourceProjection = imageSource.getProjection();
if (sourceProjection) {
ol.DEBUG && console.assert(ol.proj.equivalent(projection, sourceProjection),
goog.DEBUG && console.assert(ol.proj.equivalent(projection, sourceProjection),
'projection and sourceProjection are equivalent');
projection = sourceProjection;
}
@@ -150,7 +150,7 @@ ol.renderer.webgl.ImageLayer.prototype.prepareFrame = function(frameState, layer
}
if (image) {
ol.DEBUG && console.assert(texture, 'texture is truthy');
goog.DEBUG && console.assert(texture, 'texture is truthy');
var canvas = this.mapRenderer.getContext().getCanvas();

View File

@@ -85,7 +85,7 @@ ol.renderer.webgl.Map = function(container, map) {
preserveDrawingBuffer: false,
stencil: true
});
ol.DEBUG && console.assert(this.gl_, 'got a WebGLRenderingContext');
goog.DEBUG && console.assert(this.gl_, 'got a WebGLRenderingContext');
/**
* @private
@@ -182,7 +182,7 @@ ol.renderer.webgl.Map.prototype.bindTileTexture = function(tile, tileSize, tileG
var tileKey = tile.getKey();
if (this.textureCache_.containsKey(tileKey)) {
var textureCacheEntry = this.textureCache_.get(tileKey);
ol.DEBUG && console.assert(textureCacheEntry,
goog.DEBUG && console.assert(textureCacheEntry,
'a texture cache entry exists for key %s', tileKey);
gl.bindTexture(ol.webgl.TEXTURE_2D, textureCacheEntry.texture);
if (textureCacheEntry.magFilter != magFilter) {
@@ -248,7 +248,7 @@ ol.renderer.webgl.Map.prototype.createLayerRenderer = function(layer) {
} else if (ol.ENABLE_VECTOR && layer instanceof ol.layer.Vector) {
return new ol.renderer.webgl.VectorLayer(this, layer);
} else {
ol.DEBUG && console.assert(false, 'unexpected layer configuration');
goog.DEBUG && console.assert(false, 'unexpected layer configuration');
return null;
}
};

View File

@@ -258,7 +258,7 @@ ol.renderer.webgl.TileLayer.prototype.prepareFrame = function(frameState, layerS
if (!drawable && tile.interimTile) {
tile = tile.interimTile;
}
ol.DEBUG && console.assert(tile);
goog.DEBUG && console.assert(tile);
tileState = tile.getState();
if (tileState == ol.TileState.LOADED) {
if (mapRenderer.isTileTextureLoaded(tile)) {

View File

@@ -120,7 +120,7 @@ ol.renderer.webgl.VectorLayer.prototype.forEachFeatureAtCoordinate = function(co
* @return {?} Callback result.
*/
function(feature) {
ol.DEBUG && console.assert(feature !== undefined, 'received a feature');
goog.DEBUG && console.assert(feature !== undefined, 'received a feature');
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;