Add assert messages for all assertions up until ol.renderer.vector.
This commit is contained in:
@@ -148,7 +148,8 @@ ol.ImageTile.prototype.load = function() {
|
||||
if (this.state == ol.TileState.IDLE) {
|
||||
this.state = ol.TileState.LOADING;
|
||||
this.changed();
|
||||
goog.asserts.assert(goog.isNull(this.imageListenerKeys_));
|
||||
goog.asserts.assert(goog.isNull(this.imageListenerKeys_),
|
||||
'this.imageListenerKeys_ should be null');
|
||||
this.imageListenerKeys_ = [
|
||||
goog.events.listenOnce(this.image_, goog.events.EventType.ERROR,
|
||||
this.handleImageError_, false, this),
|
||||
@@ -166,7 +167,8 @@ ol.ImageTile.prototype.load = function() {
|
||||
* @private
|
||||
*/
|
||||
ol.ImageTile.prototype.unlistenImage_ = function() {
|
||||
goog.asserts.assert(!goog.isNull(this.imageListenerKeys_));
|
||||
goog.asserts.assert(!goog.isNull(this.imageListenerKeys_),
|
||||
'this.imageListenerKeys_ should not be null');
|
||||
goog.array.forEach(this.imageListenerKeys_, goog.events.unlistenByKey);
|
||||
this.imageListenerKeys_ = null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user