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
+6 -6
View File
@@ -100,12 +100,12 @@ ol.layer.Heatmap = function(opt_options) {
} else {
weightFunction = weight;
}
ol.DEBUG && console.assert(typeof weightFunction === 'function',
goog.DEBUG && console.assert(typeof weightFunction === 'function',
'weightFunction should be a function');
this.setStyle(function(feature, resolution) {
ol.DEBUG && console.assert(this.styleCache_, 'this.styleCache_ expected');
ol.DEBUG && console.assert(this.circleImage_ !== undefined,
goog.DEBUG && console.assert(this.styleCache_, 'this.styleCache_ expected');
goog.DEBUG && console.assert(this.circleImage_ !== undefined,
'this.circleImage_ should be defined');
var weight = weightFunction(feature);
var opacity = weight !== undefined ? ol.math.clamp(weight, 0, 1) : 1;
@@ -173,7 +173,7 @@ ol.layer.Heatmap.createGradient_ = function(colors) {
ol.layer.Heatmap.prototype.createCircle_ = function() {
var radius = this.getRadius();
var blur = this.getBlur();
ol.DEBUG && console.assert(radius !== undefined && blur !== undefined,
goog.DEBUG && console.assert(radius !== undefined && blur !== undefined,
'radius and blur should be defined');
var halfSize = radius + blur + 1;
var size = 2 * halfSize;
@@ -246,9 +246,9 @@ ol.layer.Heatmap.prototype.handleStyleChanged_ = function() {
* @private
*/
ol.layer.Heatmap.prototype.handleRender_ = function(event) {
ol.DEBUG && console.assert(event.type == ol.render.EventType.RENDER,
goog.DEBUG && console.assert(event.type == ol.render.EventType.RENDER,
'event.type should be RENDER');
ol.DEBUG && console.assert(this.gradient_, 'this.gradient_ expected');
goog.DEBUG && console.assert(this.gradient_, 'this.gradient_ expected');
var context = event.context;
var canvas = context.canvas;
var image = context.getImageData(0, 0, canvas.width, canvas.height);
+2 -2
View File
@@ -130,7 +130,7 @@ ol.layer.Group.prototype.handleLayersChanged_ = function(event) {
ol.layer.Group.prototype.handleLayersAdd_ = function(collectionEvent) {
var layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
var key = ol.getUid(layer).toString();
ol.DEBUG && console.assert(!(key in this.listenerKeys_),
goog.DEBUG && console.assert(!(key in this.listenerKeys_),
'listeners already registered');
this.listenerKeys_[key] = [
ol.events.listen(layer, ol.ObjectEventType.PROPERTYCHANGE,
@@ -149,7 +149,7 @@ ol.layer.Group.prototype.handleLayersAdd_ = function(collectionEvent) {
ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) {
var layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
var key = ol.getUid(layer).toString();
ol.DEBUG && console.assert(key in this.listenerKeys_, 'no listeners to unregister');
goog.DEBUG && console.assert(key in this.listenerKeys_, 'no listeners to unregister');
this.listenerKeys_[key].forEach(ol.events.unlistenByKey);
delete this.listenerKeys_[key];
this.changed();
+2 -2
View File
@@ -32,7 +32,7 @@ ol.layer.Vector = function(opt_options) {
var options = opt_options ?
opt_options : /** @type {olx.layer.VectorOptions} */ ({});
ol.DEBUG && console.assert(
goog.DEBUG && console.assert(
options.renderOrder === undefined || !options.renderOrder ||
typeof options.renderOrder === 'function',
'renderOrder must be a comparator function');
@@ -158,7 +158,7 @@ ol.layer.Vector.prototype.getUpdateWhileInteracting = function() {
* Render order.
*/
ol.layer.Vector.prototype.setRenderOrder = function(renderOrder) {
ol.DEBUG && console.assert(
goog.DEBUG && console.assert(
renderOrder === undefined || !renderOrder ||
typeof renderOrder === 'function',
'renderOrder must be a comparator function');