Change ol.ImageState to ol.Image.State
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
goog.provide('ol.ImageCanvas');
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.Image');
|
||||
goog.require('ol.ImageBase');
|
||||
goog.require('ol.ImageState');
|
||||
|
||||
|
||||
/**
|
||||
@@ -27,7 +27,7 @@ ol.ImageCanvas = function(extent, resolution, pixelRatio, attributions,
|
||||
this.loader_ = opt_loader !== undefined ? opt_loader : null;
|
||||
|
||||
var state = opt_loader !== undefined ?
|
||||
ol.ImageState.IDLE : ol.ImageState.LOADED;
|
||||
ol.Image.State.IDLE : ol.Image.State.LOADED;
|
||||
|
||||
ol.ImageBase.call(this, extent, resolution, pixelRatio, state, attributions);
|
||||
|
||||
@@ -64,9 +64,9 @@ ol.ImageCanvas.prototype.getError = function() {
|
||||
ol.ImageCanvas.prototype.handleLoad_ = function(err) {
|
||||
if (err) {
|
||||
this.error_ = err;
|
||||
this.state = ol.ImageState.ERROR;
|
||||
this.state = ol.Image.State.ERROR;
|
||||
} else {
|
||||
this.state = ol.ImageState.LOADED;
|
||||
this.state = ol.Image.State.LOADED;
|
||||
}
|
||||
this.changed();
|
||||
};
|
||||
@@ -76,9 +76,9 @@ ol.ImageCanvas.prototype.handleLoad_ = function(err) {
|
||||
* Trigger drawing on canvas.
|
||||
*/
|
||||
ol.ImageCanvas.prototype.load = function() {
|
||||
if (this.state == ol.ImageState.IDLE) {
|
||||
if (this.state == ol.Image.State.IDLE) {
|
||||
goog.DEBUG && console.assert(this.loader_, 'this.loader_ must be set');
|
||||
this.state = ol.ImageState.LOADING;
|
||||
this.state = ol.Image.State.LOADING;
|
||||
this.changed();
|
||||
this.loader_(this.handleLoad_.bind(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user