Hi, I use a Picture to display a internet image, when I download, the image got blank, please help how to resolve this?
The code is bellow:
downloadImage() {
this.diagram.makeImageData({
background: this.colorGroup[this.colormodel],
returnType: "blob",
callback: this.myCallback,
});
},
myCallback(blob) {
var url = window.URL.createObjectURL(blob);
var filename = "myMindmap.png";
var a = document.createElement("a");
a.style = "display: none";
a.href = url;
a.download = filename;
// IE 11
if (window.navigator.msSaveBlob !== undefined) {
window.navigator.msSaveBlob(blob, filename);
return;
}
document.body.appendChild(a);
requestAnimationFrame(function () {
a.click();
window.URL.revokeObjectURL(url);
document.body.removeChild(a);
});
},