Use goog.DEBUG instead of ol.DEBUG for now
This commit is contained in:
@@ -119,9 +119,9 @@ ol.style.AtlasManager.prototype.getInfo_ = function(atlases, id) {
|
||||
* entry, or `null` if the entry is not part of the atlases.
|
||||
*/
|
||||
ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
|
||||
ol.DEBUG && console.assert(info.offsetX === hitInfo.offsetX,
|
||||
goog.DEBUG && console.assert(info.offsetX === hitInfo.offsetX,
|
||||
'in order to merge, offsetX of info and hitInfo must be equal');
|
||||
ol.DEBUG && console.assert(info.offsetY === hitInfo.offsetY,
|
||||
goog.DEBUG && console.assert(info.offsetY === hitInfo.offsetY,
|
||||
'in order to merge, offsetY of info and hitInfo must be equal');
|
||||
return /** @type {ol.AtlasManagerInfo} */ ({
|
||||
offsetX: info.offsetX,
|
||||
@@ -220,7 +220,7 @@ ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
|
||||
++ii;
|
||||
}
|
||||
}
|
||||
ol.DEBUG && console.assert(false, 'Failed to add to atlasmanager');
|
||||
goog.DEBUG && console.assert(false, 'Failed to add to atlasmanager');
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
@@ -288,7 +288,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
|
||||
var info = atlasManager.add(
|
||||
id, size, size, this.draw_.bind(this, renderOptions),
|
||||
renderHitDetectionCallback);
|
||||
ol.DEBUG && console.assert(info, 'circle radius is too large');
|
||||
goog.DEBUG && console.assert(info, 'circle radius is too large');
|
||||
|
||||
this.canvas_ = info.image;
|
||||
this.origin_ = [info.offsetX, info.offsetY];
|
||||
|
||||
@@ -576,9 +576,9 @@ ol.style.IconImage_.prototype.getSrc = function() {
|
||||
*/
|
||||
ol.style.IconImage_.prototype.load = function() {
|
||||
if (this.imageState_ == ol.style.ImageState.IDLE) {
|
||||
ol.DEBUG && console.assert(this.src_ !== undefined,
|
||||
goog.DEBUG && console.assert(this.src_ !== undefined,
|
||||
'this.src_ must not be undefined');
|
||||
ol.DEBUG && console.assert(!this.imageListenerKeys_,
|
||||
goog.DEBUG && console.assert(!this.imageListenerKeys_,
|
||||
'no listener keys existing');
|
||||
this.imageState_ = ol.style.ImageState.LOADING;
|
||||
this.imageListenerKeys_ = [
|
||||
@@ -604,7 +604,7 @@ ol.style.IconImage_.prototype.replaceColor_ = function() {
|
||||
return;
|
||||
}
|
||||
|
||||
ol.DEBUG && console.assert(this.canvas_ !== null,
|
||||
goog.DEBUG && console.assert(this.canvas_ !== null,
|
||||
'this.canvas_ must not be null');
|
||||
|
||||
this.canvas_.width = this.image_.width;
|
||||
@@ -634,7 +634,7 @@ ol.style.IconImage_.prototype.replaceColor_ = function() {
|
||||
* @private
|
||||
*/
|
||||
ol.style.IconImage_.prototype.unlistenImage_ = function() {
|
||||
ol.DEBUG && console.assert(this.imageListenerKeys_,
|
||||
goog.DEBUG && console.assert(this.imageListenerKeys_,
|
||||
'we must have listeners registered');
|
||||
this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
|
||||
this.imageListenerKeys_ = null;
|
||||
@@ -675,7 +675,7 @@ goog.addSingletonGetter(ol.style.IconImageCache);
|
||||
* @return {string} Cache key.
|
||||
*/
|
||||
ol.style.IconImageCache.getKey = function(src, crossOrigin, color) {
|
||||
ol.DEBUG && console.assert(crossOrigin !== undefined,
|
||||
goog.DEBUG && console.assert(crossOrigin !== undefined,
|
||||
'argument crossOrigin must be defined');
|
||||
var colorString = color ? ol.color.asString(color) : 'null';
|
||||
return crossOrigin + ':' + src + ':' + colorString;
|
||||
|
||||
@@ -26,7 +26,7 @@ goog.require('ol.style.Stroke');
|
||||
*/
|
||||
ol.style.RegularShape = function(options) {
|
||||
|
||||
ol.DEBUG && console.assert(
|
||||
goog.DEBUG && console.assert(
|
||||
options.radius !== undefined || options.radius1 !== undefined,
|
||||
'must provide either "radius" or "radius1"');
|
||||
|
||||
@@ -366,7 +366,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
|
||||
var info = atlasManager.add(
|
||||
id, size, size, this.draw_.bind(this, renderOptions),
|
||||
renderHitDetectionCallback);
|
||||
ol.DEBUG && console.assert(info, 'shape size is too large');
|
||||
goog.DEBUG && console.assert(info, 'shape size is too large');
|
||||
|
||||
this.canvas_ = info.image;
|
||||
this.origin_ = [info.offsetX, info.offsetY];
|
||||
|
||||
@@ -335,6 +335,6 @@ ol.style.createDefaultEditingStyles = function() {
|
||||
* @return {ol.geom.Geometry|ol.render.Feature|undefined} Geometry to render.
|
||||
*/
|
||||
ol.style.defaultGeometryFunction = function(feature) {
|
||||
ol.DEBUG && console.assert(feature, 'feature must not be null');
|
||||
goog.DEBUG && console.assert(feature, 'feature must not be null');
|
||||
return feature.getGeometry();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user