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

@@ -244,8 +244,8 @@ ol.render.canvas.Immediate.prototype.drawImages_ = function(flatCoordinates, off
if (!this.image_) {
return;
}
ol.DEBUG && console.assert(offset === 0, 'offset should be 0');
ol.DEBUG && console.assert(end == flatCoordinates.length,
goog.DEBUG && console.assert(offset === 0, 'offset should be 0');
goog.DEBUG && console.assert(end == flatCoordinates.length,
'end should be equal to the length of flatCoordinates');
var pixelCoordinates = ol.geom.flat.transform.transform2D(
flatCoordinates, offset, end, 2, this.transform_,
@@ -309,8 +309,8 @@ ol.render.canvas.Immediate.prototype.drawText_ = function(flatCoordinates, offse
this.setContextStrokeState_(this.textStrokeState_);
}
this.setContextTextState_(this.textState_);
ol.DEBUG && console.assert(offset === 0, 'offset should be 0');
ol.DEBUG && console.assert(end == flatCoordinates.length,
goog.DEBUG && console.assert(offset === 0, 'offset should be 0');
goog.DEBUG && console.assert(end == flatCoordinates.length,
'end should be equal to the length of flatCoordinates');
var pixelCoordinates = ol.geom.flat.transform.transform2D(
flatCoordinates, offset, end, stride, this.transform_,
@@ -476,7 +476,7 @@ ol.render.canvas.Immediate.prototype.drawGeometry = function(geometry) {
this.drawCircle(/** @type {ol.geom.Circle} */ (geometry));
break;
default:
ol.DEBUG && console.assert(false, 'Unsupported geometry type: ' + type);
goog.DEBUG && console.assert(false, 'Unsupported geometry type: ' + type);
}
};
@@ -498,7 +498,7 @@ ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) {
return;
}
this.setStyle(style);
ol.DEBUG && console.assert(geometry, 'geometry must be truthy');
goog.DEBUG && console.assert(geometry, 'geometry must be truthy');
this.drawGeometry(geometry);
};
@@ -852,10 +852,10 @@ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
var imageImage = imageStyle.getImage(1);
var imageOrigin = imageStyle.getOrigin();
var imageSize = imageStyle.getSize();
ol.DEBUG && console.assert(imageAnchor, 'imageAnchor must be truthy');
ol.DEBUG && console.assert(imageImage, 'imageImage must be truthy');
ol.DEBUG && console.assert(imageOrigin, 'imageOrigin must be truthy');
ol.DEBUG && console.assert(imageSize, 'imageSize must be truthy');
goog.DEBUG && console.assert(imageAnchor, 'imageAnchor must be truthy');
goog.DEBUG && console.assert(imageImage, 'imageImage must be truthy');
goog.DEBUG && console.assert(imageOrigin, 'imageOrigin must be truthy');
goog.DEBUG && console.assert(imageSize, 'imageSize must be truthy');
this.imageAnchorX_ = imageAnchor[0];
this.imageAnchorY_ = imageAnchor[1];
this.imageHeight_ = imageSize[1];