Remove ol.style.ImageState and use ol.ImageState instead

This commit is contained in:
Frederic Junod
2016-08-29 09:55:48 +02:00
parent c393d43005
commit 1fecb6fd16
6 changed files with 25 additions and 37 deletions

View File

@@ -1,8 +1,8 @@
goog.provide('ol.renderer.vector');
goog.require('ol');
goog.require('ol.ImageState');
goog.require('ol.render.ReplayType');
goog.require('ol.style.ImageState');
/**
@@ -79,15 +79,15 @@ ol.renderer.vector.renderFeature = function(
imageStyle = style.getImage();
if (imageStyle) {
imageState = imageStyle.getImageState();
if (imageState == ol.style.ImageState.LOADED ||
imageState == ol.style.ImageState.ERROR) {
if (imageState == ol.ImageState.LOADED ||
imageState == ol.ImageState.ERROR) {
imageStyle.unlistenImageChange(listener, thisArg);
} else {
if (imageState == ol.style.ImageState.IDLE) {
if (imageState == ol.ImageState.IDLE) {
imageStyle.load();
}
imageState = imageStyle.getImageState();
goog.DEBUG && console.assert(imageState == ol.style.ImageState.LOADING,
goog.DEBUG && console.assert(imageState == ol.ImageState.LOADING,
'imageState should be LOADING');
imageStyle.listenImageChange(listener, thisArg);
loading = true;
@@ -227,7 +227,7 @@ ol.renderer.vector.renderMultiPolygonGeometry_ = function(replayGroup, geometry,
ol.renderer.vector.renderPointGeometry_ = function(replayGroup, geometry, style, feature) {
var imageStyle = style.getImage();
if (imageStyle) {
if (imageStyle.getImageState() != ol.style.ImageState.LOADED) {
if (imageStyle.getImageState() != ol.ImageState.LOADED) {
return;
}
var imageReplay = replayGroup.getReplay(
@@ -256,7 +256,7 @@ ol.renderer.vector.renderPointGeometry_ = function(replayGroup, geometry, style,
ol.renderer.vector.renderMultiPointGeometry_ = function(replayGroup, geometry, style, feature) {
var imageStyle = style.getImage();
if (imageStyle) {
if (imageStyle.getImageState() != ol.style.ImageState.LOADED) {
if (imageStyle.getImageState() != ol.ImageState.LOADED) {
return;
}
var imageReplay = replayGroup.getReplay(