Remove ol.DEBUG
This commit is contained in:
@@ -118,10 +118,6 @@ 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,
|
||||
'in order to merge, offsetX of info and hitInfo must be equal');
|
||||
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,
|
||||
offsetY: info.offsetY,
|
||||
@@ -219,6 +215,5 @@ ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
|
||||
++ii;
|
||||
}
|
||||
}
|
||||
ol.DEBUG && console.assert(false, 'Failed to add to atlasmanager');
|
||||
return null;
|
||||
};
|
||||
|
||||
@@ -220,10 +220,6 @@ ol.style.IconImage.prototype.getSrc = function() {
|
||||
*/
|
||||
ol.style.IconImage.prototype.load = function() {
|
||||
if (this.imageState_ == ol.ImageState.IDLE) {
|
||||
ol.DEBUG && console.assert(this.src_ !== undefined,
|
||||
'this.src_ must not be undefined');
|
||||
ol.DEBUG && console.assert(!this.imageListenerKeys_,
|
||||
'no listener keys existing');
|
||||
this.imageState_ = ol.ImageState.LOADING;
|
||||
this.imageListenerKeys_ = [
|
||||
ol.events.listenOnce(this.image_, ol.events.EventType.ERROR,
|
||||
|
||||
@@ -37,8 +37,6 @@ ol.style.IconImageCache = function() {
|
||||
* @return {string} Cache key.
|
||||
*/
|
||||
ol.style.IconImageCache.getKey = function(src, crossOrigin, color) {
|
||||
ol.DEBUG && console.assert(crossOrigin !== undefined,
|
||||
'argument crossOrigin must be defined');
|
||||
var colorString = color ? ol.color.asString(color) : 'null';
|
||||
return crossOrigin + ':' + src + ':' + colorString;
|
||||
};
|
||||
|
||||
@@ -21,11 +21,6 @@ goog.require('ol.style.Image');
|
||||
* @api
|
||||
*/
|
||||
ol.style.RegularShape = function(options) {
|
||||
|
||||
ol.DEBUG && console.assert(
|
||||
options.radius !== undefined || options.radius1 !== undefined,
|
||||
'must provide either "radius" or "radius1"');
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array.<string>}
|
||||
@@ -139,7 +134,6 @@ ol.style.RegularShape = function(options) {
|
||||
scale: 1,
|
||||
snapToPixel: snapToPixel
|
||||
});
|
||||
|
||||
};
|
||||
ol.inherits(ol.style.RegularShape, ol.style.Image);
|
||||
|
||||
@@ -392,7 +386,6 @@ 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');
|
||||
|
||||
this.canvas_ = info.image;
|
||||
this.origin_ = [info.offsetX, info.offsetY];
|
||||
|
||||
Reference in New Issue
Block a user