Added crossOrign flag to images so that we can load them correctly when origins are different.
This commit is contained in:
parent
9b24fd186c
commit
ee26b122e6
@ -15,6 +15,7 @@ class Aperture {
|
|||||||
img.onload = () => resolve();
|
img.onload = () => resolve();
|
||||||
img.onerror = () => resolve();
|
img.onerror = () => resolve();
|
||||||
});
|
});
|
||||||
|
img.crossOrigin = "Anonymous";
|
||||||
img.src = image;
|
img.src = image;
|
||||||
await promise;
|
await promise;
|
||||||
}
|
}
|
||||||
@ -56,6 +57,7 @@ class Aperture {
|
|||||||
img.onload = () => resolve();
|
img.onload = () => resolve();
|
||||||
img.onerror = () => resolve();
|
img.onerror = () => resolve();
|
||||||
});
|
});
|
||||||
|
img.crossOrigin = "Anonymous";
|
||||||
img.src = image;
|
img.src = image;
|
||||||
await promise;
|
await promise;
|
||||||
|
|
||||||
@ -89,6 +91,7 @@ class Aperture {
|
|||||||
img.onload = () => resolve();
|
img.onload = () => resolve();
|
||||||
img.onerror = () => resolve();
|
img.onerror = () => resolve();
|
||||||
});
|
});
|
||||||
|
img.crossOrigin = "Anonymous";
|
||||||
img.src = image;
|
img.src = image;
|
||||||
await promise;
|
await promise;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user