From 23745cd04311db2e6dda1f6595c5c14cfa499b11 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Sat, 6 Sep 2014 17:52:11 +0200 Subject: [PATCH] Use ol.LEGACY_IE_SUPPORT and ol.IS_LEGACY_IE define See #1605 --- src/ol/imagetile.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ol/imagetile.js b/src/ol/imagetile.js index 57e85abd36..3ed3b79627 100644 --- a/src/ol/imagetile.js +++ b/src/ol/imagetile.js @@ -113,9 +113,11 @@ ol.ImageTile.prototype.handleImageError_ = function() { * @private */ ol.ImageTile.prototype.handleImageLoad_ = function() { - if (!goog.isDef(this.image_.naturalWidth)) { - this.image_.naturalWidth = this.image_.width; - this.image_.naturalHeight = this.image_.height; + if (ol.LEGACY_IE_SUPPORT && ol.IS_LEGACY_IE) { + if (!goog.isDef(this.image_.naturalWidth)) { + this.image_.naturalWidth = this.image_.width; + this.image_.naturalHeight = this.image_.height; + } } if (this.image_.naturalWidth && this.image_.naturalHeight) {