Remove ol.DEBUG

This commit is contained in:
Tim Schaub
2016-12-29 09:09:24 -07:00
parent 7b9690a691
commit 137cdc04c8
128 changed files with 309 additions and 2027 deletions

View File

@@ -116,20 +116,12 @@ ol.renderer.Layer.prototype.loadImage = function(image) {
var imageState = image.getState();
if (imageState != ol.ImageState.LOADED &&
imageState != ol.ImageState.ERROR) {
// the image is either "idle" or "loading", register the change
// listener (a noop if the listener was already registered)
ol.DEBUG && console.assert(imageState == ol.ImageState.IDLE ||
imageState == ol.ImageState.LOADING,
'imageState is "idle" or "loading"');
ol.events.listen(image, ol.events.EventType.CHANGE,
this.handleImageChange_, this);
}
if (imageState == ol.ImageState.IDLE) {
image.load();
imageState = image.getState();
ol.DEBUG && console.assert(imageState == ol.ImageState.LOADING ||
imageState == ol.ImageState.LOADED,
'imageState is "loading" or "loaded"');
}
return imageState == ol.ImageState.LOADED;
};