Rename _ol_ImageState_ to ImageState
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @module ol/style/Icon
|
||||
*/
|
||||
import {getUid, inherits} from '../index.js';
|
||||
import _ol_ImageState_ from '../ImageState.js';
|
||||
import ImageState from '../ImageState.js';
|
||||
import {assert} from '../asserts.js';
|
||||
import _ol_color_ from '../color.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
@@ -95,7 +95,7 @@ var _ol_style_Icon_ = function(opt_options) {
|
||||
* @type {ol.ImageState}
|
||||
*/
|
||||
var imageState = options.src !== undefined ?
|
||||
_ol_ImageState_.IDLE : _ol_ImageState_.LOADED;
|
||||
ImageState.IDLE : ImageState.LOADED;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
@@ -6,7 +6,7 @@ import {createCanvasContext2D} from '../dom.js';
|
||||
import _ol_events_ from '../events.js';
|
||||
import EventTarget from '../events/EventTarget.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import _ol_ImageState_ from '../ImageState.js';
|
||||
import ImageState from '../ImageState.js';
|
||||
import _ol_style_ from '../style.js';
|
||||
|
||||
/**
|
||||
@@ -83,7 +83,7 @@ var _ol_style_IconImage_ = function(image, src, size, crossOrigin, imageState,
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.tainting_ = false;
|
||||
if (this.imageState_ == _ol_ImageState_.LOADED) {
|
||||
if (this.imageState_ == ImageState.LOADED) {
|
||||
this.determineTainting_();
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ _ol_style_IconImage_.prototype.dispatchChangeEvent_ = function() {
|
||||
* @private
|
||||
*/
|
||||
_ol_style_IconImage_.prototype.handleImageError_ = function() {
|
||||
this.imageState_ = _ol_ImageState_.ERROR;
|
||||
this.imageState_ = ImageState.ERROR;
|
||||
this.unlistenImage_();
|
||||
this.dispatchChangeEvent_();
|
||||
};
|
||||
@@ -150,7 +150,7 @@ _ol_style_IconImage_.prototype.handleImageError_ = function() {
|
||||
* @private
|
||||
*/
|
||||
_ol_style_IconImage_.prototype.handleImageLoad_ = function() {
|
||||
this.imageState_ = _ol_ImageState_.LOADED;
|
||||
this.imageState_ = ImageState.LOADED;
|
||||
if (this.size_) {
|
||||
this.image_.width = this.size_[0];
|
||||
this.image_.height = this.size_[1];
|
||||
@@ -220,8 +220,8 @@ _ol_style_IconImage_.prototype.getSrc = function() {
|
||||
* Load not yet loaded URI.
|
||||
*/
|
||||
_ol_style_IconImage_.prototype.load = function() {
|
||||
if (this.imageState_ == _ol_ImageState_.IDLE) {
|
||||
this.imageState_ = _ol_ImageState_.LOADING;
|
||||
if (this.imageState_ == ImageState.IDLE) {
|
||||
this.imageState_ = ImageState.LOADING;
|
||||
this.imageListenerKeys_ = [
|
||||
_ol_events_.listenOnce(this.image_, EventType.ERROR,
|
||||
this.handleImageError_, this),
|
||||
|
||||
@@ -5,7 +5,7 @@ import {inherits} from '../index.js';
|
||||
import {asColorLike} from '../colorlike.js';
|
||||
import {createCanvasContext2D} from '../dom.js';
|
||||
import _ol_has_ from '../has.js';
|
||||
import _ol_ImageState_ from '../ImageState.js';
|
||||
import ImageState from '../ImageState.js';
|
||||
import _ol_render_canvas_ from '../render/canvas.js';
|
||||
import _ol_style_Image_ from '../style/Image.js';
|
||||
|
||||
@@ -228,7 +228,7 @@ _ol_style_RegularShape_.prototype.getHitDetectionImageSize = function() {
|
||||
* @inheritDoc
|
||||
*/
|
||||
_ol_style_RegularShape_.prototype.getImageState = function() {
|
||||
return _ol_ImageState_.LOADED;
|
||||
return ImageState.LOADED;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user