If naturalWidth/Height properties aren't available, mimic them

This commit is contained in:
Austin Hyde
2013-11-20 15:35:01 -05:00
parent 40276ab6ba
commit 0e05cd2263

View File

@@ -115,6 +115,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 (this.image_.naturalWidth && this.image_.naturalHeight) {
this.state = ol.TileState.LOADED;
} else {