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
+5 -5
View File
@@ -59,7 +59,7 @@ ol.structs.RBush.prototype.insert = function(extent, value) {
this.rbush_.insert(item);
// remember the object that was added to the internal rbush
ol.DEBUG && console.assert(!(ol.getUid(value) in this.items_),
goog.DEBUG && console.assert(!(ol.getUid(value) in this.items_),
'uid (%s) of value (%s) already exists', ol.getUid(value), value);
this.items_[ol.getUid(value)] = item;
};
@@ -74,7 +74,7 @@ ol.structs.RBush.prototype.load = function(extents, values) {
if (goog.DEBUG && this.readers_) {
throw new Error('Can not insert values while reading');
}
ol.DEBUG && console.assert(extents.length === values.length,
goog.DEBUG && console.assert(extents.length === values.length,
'extens and values must have same length (%s === %s)',
extents.length, values.length);
@@ -92,7 +92,7 @@ ol.structs.RBush.prototype.load = function(extents, values) {
value: value
};
items[i] = item;
ol.DEBUG && console.assert(!(ol.getUid(value) in this.items_),
goog.DEBUG && console.assert(!(ol.getUid(value) in this.items_),
'uid (%s) of value (%s) already exists', ol.getUid(value), value);
this.items_[ol.getUid(value)] = item;
}
@@ -110,7 +110,7 @@ ol.structs.RBush.prototype.remove = function(value) {
throw new Error('Can not remove value while reading');
}
var uid = ol.getUid(value);
ol.DEBUG && console.assert(uid in this.items_,
goog.DEBUG && console.assert(uid in this.items_,
'uid (%s) of value (%s) does not exist', uid, value);
// get the object in which the value was wrapped when adding to the
@@ -127,7 +127,7 @@ ol.structs.RBush.prototype.remove = function(value) {
* @param {T} value Value.
*/
ol.structs.RBush.prototype.update = function(extent, value) {
ol.DEBUG && console.assert(ol.getUid(value) in this.items_,
goog.DEBUG && console.assert(ol.getUid(value) in this.items_,
'uid (%s) of value (%s) does not exist', ol.getUid(value), value);
var item = this.items_[ol.getUid(value)];