mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Set crossOrigin before src on image objects.
Reason: https://bugs.chromium.org/p/chromium/issues/detail?id=341047
This commit is contained in:
parent
5a9f3dfb27
commit
84421abbce
1 changed files with 1 additions and 1 deletions
|
@ -371,9 +371,9 @@ var Raster = Item.extend(/** @lends Raster# */{
|
||||||
setSource: function(src) {
|
setSource: function(src) {
|
||||||
var image = new window.Image(),
|
var image = new window.Image(),
|
||||||
crossOrigin = this._crossOrigin;
|
crossOrigin = this._crossOrigin;
|
||||||
image.src = src;
|
|
||||||
if (crossOrigin)
|
if (crossOrigin)
|
||||||
image.crossOrigin = crossOrigin;
|
image.crossOrigin = crossOrigin;
|
||||||
|
image.src = src;
|
||||||
this.setImage(image);
|
this.setImage(image);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue