Avoid setting crossOrigin on an image if unspecified. Closes #971

This commit is contained in:
kangax 2013-11-27 20:00:33 +01:00
parent 0f23f14a44
commit 56f0bfb9cc
5 changed files with 13 additions and 13 deletions

4
dist/all.js vendored
View file

@ -476,8 +476,8 @@ fabric.Collection = {
// https://github.com/kangax/fabric.js/commit/d0abb90f1cd5c5ef9d2a94d3fb21a22330da3e0a#commitcomment-4513767
// see https://code.google.com/p/chromium/issues/detail?id=315152
// https://bugzilla.mozilla.org/show_bug.cgi?id=935069
if (url.indexOf('data') !== 0) {
img.crossOrigin = crossOrigin || '';
if (url.indexOf('data') !== 0 && typeof crossOrigin !== 'undefined') {
img.crossOrigin = crossOrigin;
}
img.src = url;

14
dist/all.min.js vendored

File diff suppressed because one or more lines are too long

BIN
dist/all.min.js.gz vendored

Binary file not shown.

4
dist/all.require.js vendored
View file

@ -476,8 +476,8 @@ fabric.Collection = {
// https://github.com/kangax/fabric.js/commit/d0abb90f1cd5c5ef9d2a94d3fb21a22330da3e0a#commitcomment-4513767
// see https://code.google.com/p/chromium/issues/detail?id=315152
// https://bugzilla.mozilla.org/show_bug.cgi?id=935069
if (url.indexOf('data') !== 0) {
img.crossOrigin = crossOrigin || '';
if (url.indexOf('data') !== 0 && typeof crossOrigin !== 'undefined') {
img.crossOrigin = crossOrigin;
}
img.src = url;

View file

@ -169,8 +169,8 @@
// https://github.com/kangax/fabric.js/commit/d0abb90f1cd5c5ef9d2a94d3fb21a22330da3e0a#commitcomment-4513767
// see https://code.google.com/p/chromium/issues/detail?id=315152
// https://bugzilla.mozilla.org/show_bug.cgi?id=935069
if (url.indexOf('data') !== 0) {
img.crossOrigin = crossOrigin || '';
if (url.indexOf('data') !== 0 && typeof crossOrigin !== 'undefined') {
img.crossOrigin = crossOrigin;
}
img.src = url;