Rename goog.DEBUG to ol.DEBUG
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) {
|
||||
goog.DEBUG && console.assert(info.offsetX === hitInfo.offsetX,
|
||||
ol.DEBUG && console.assert(info.offsetX === hitInfo.offsetX,
|
||||
'in order to merge, offsetX of info and hitInfo must be equal');
|
||||
goog.DEBUG && console.assert(info.offsetY === hitInfo.offsetY,
|
||||
ol.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;
|
||||
}
|
||||
}
|
||||
goog.DEBUG && console.assert(false, 'Failed to add to atlasmanager');
|
||||
ol.DEBUG && console.assert(false, 'Failed to add to atlasmanager');
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ ol.style.Circle.prototype.render_ = function(atlasManager) {
|
||||
var info = atlasManager.add(
|
||||
id, size, size, this.draw_.bind(this, renderOptions),
|
||||
renderHitDetectionCallback);
|
||||
goog.DEBUG && console.assert(info, 'circle radius is too large');
|
||||
ol.DEBUG && console.assert(info, 'circle radius is too large');
|
||||
|
||||
this.canvas_ = info.image;
|
||||
this.origin_ = [info.offsetX, info.offsetY];
|
||||
|
||||
@@ -220,9 +220,9 @@ ol.style.IconImage.prototype.getSrc = function() {
|
||||
*/
|
||||
ol.style.IconImage.prototype.load = function() {
|
||||
if (this.imageState_ == ol.Image.State.IDLE) {
|
||||
goog.DEBUG && console.assert(this.src_ !== undefined,
|
||||
ol.DEBUG && console.assert(this.src_ !== undefined,
|
||||
'this.src_ must not be undefined');
|
||||
goog.DEBUG && console.assert(!this.imageListenerKeys_,
|
||||
ol.DEBUG && console.assert(!this.imageListenerKeys_,
|
||||
'no listener keys existing');
|
||||
this.imageState_ = ol.Image.State.LOADING;
|
||||
this.imageListenerKeys_ = [
|
||||
|
||||
@@ -36,7 +36,7 @@ ol.style.IconImageCache = function() {
|
||||
* @return {string} Cache key.
|
||||
*/
|
||||
ol.style.IconImageCache.getKey = function(src, crossOrigin, color) {
|
||||
goog.DEBUG && console.assert(crossOrigin !== undefined,
|
||||
ol.DEBUG && console.assert(crossOrigin !== undefined,
|
||||
'argument crossOrigin must be defined');
|
||||
var colorString = color ? ol.color.asString(color) : 'null';
|
||||
return crossOrigin + ':' + src + ':' + colorString;
|
||||
|
||||
@@ -23,7 +23,7 @@ goog.require('ol.style.Image');
|
||||
*/
|
||||
ol.style.RegularShape = function(options) {
|
||||
|
||||
goog.DEBUG && console.assert(
|
||||
ol.DEBUG && console.assert(
|
||||
options.radius !== undefined || options.radius1 !== undefined,
|
||||
'must provide either "radius" or "radius1"');
|
||||
|
||||
@@ -363,7 +363,7 @@ ol.style.RegularShape.prototype.render_ = function(atlasManager) {
|
||||
var info = atlasManager.add(
|
||||
id, size, size, this.draw_.bind(this, renderOptions),
|
||||
renderHitDetectionCallback);
|
||||
goog.DEBUG && console.assert(info, 'shape size is too large');
|
||||
ol.DEBUG && console.assert(info, 'shape size is too large');
|
||||
|
||||
this.canvas_ = info.image;
|
||||
this.origin_ = [info.offsetX, info.offsetY];
|
||||
|
||||
Reference in New Issue
Block a user