From 5c70d37da670544508b52f351845e0bfd6e31332 Mon Sep 17 00:00:00 2001 From: Alexandre Brault Date: Thu, 19 Nov 2015 08:12:37 -0500 Subject: [PATCH] Don't tint the icon if the image is tainted --- src/ol/style/iconstyle.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/style/iconstyle.js b/src/ol/style/iconstyle.js index c3f50e01bf..73ac945c33 100644 --- a/src/ol/style/iconstyle.js +++ b/src/ol/style/iconstyle.js @@ -516,8 +516,8 @@ ol.style.IconImage_.prototype.handleImageLoad_ = function() { this.imageState_ = ol.style.ImageState.LOADED; this.size_ = [this.image_.width, this.image_.height]; this.unlistenImage_(); - this.replaceColor_(); this.determineTainting_(); + this.replaceColor_(); this.dispatchChangeEvent_(); }; @@ -604,7 +604,7 @@ ol.style.IconImage_.prototype.load = function() { * @private */ ol.style.IconImage_.prototype.replaceColor_ = function() { - if (this.color_ === null) { + if (this.tainting_ || this.color_ === null) { return; }