Set crossOrigin before src on image objects.

Reason: https://bugs.chromium.org/p/chromium/issues/detail?id=341047
This commit is contained in:
Jürg Lehni 2016-04-05 12:25:24 -07:00
parent 5a9f3dfb27
commit 84421abbce

View file

@ -371,9 +371,9 @@ var Raster = Item.extend(/** @lends Raster# */{
setSource: function(src) {
var image = new window.Image(),
crossOrigin = this._crossOrigin;
image.src = src;
if (crossOrigin)
image.crossOrigin = crossOrigin;
image.src = src;
this.setImage(image);
},