We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbe942a commit 536c90eCopy full SHA for 536c90e
src/components/images/draw.js
@@ -84,6 +84,11 @@ module.exports = function draw(gd) {
84
var img = new Image();
85
this.img = img;
86
87
+ if (d.source && d.source.slice(0, 5) === 'data:') {
88
+ img.src = d.source;
89
+ thisImage.attr('xlink:href', d.source);
90
+ resolve();
91
+ } else {
92
// If not set, a `tainted canvas` error is thrown
93
img.setAttribute('crossOrigin', 'anonymous');
94
img.onerror = errorHandler;
@@ -109,6 +114,7 @@ module.exports = function draw(gd) {
109
114
thisImage.on('error', errorHandler);
110
115
111
116
img.src = d.source;
117
+ }
112
118
113
119
function errorHandler() {
120
thisImage.remove();
0 commit comments