Hey,
My diagram contains elements dropped from a palette containing Shapes and Pictures. I am trying to use the makeImageData function to get an image of the diagram. When download occurs I am able to see the shape nodes in the diagram but the images that were drag and dropped in the diagram were lost
Code used identical to as shown in samples
function myCallback(blob) {
var url = window.URL.createObjectURL(blob);
var filename = "myBlobFile.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);
});
}
function makeBlob() {
var blob = myDiagram.makeImageData({ background: "white", returnType: "blob", callback: myCallback });
}
Hey , I tried out CORS but facing a certain issue , since the application is still on local html5 and
which domain request should i allow through CORS in my Javascript?
I also tried adding a CORS extension to my chrome and tested post switching on CORS , it still wasn’t able to download the images.
It works absolutely fine with Internet Explorer and Firefox
How can make it function for chrome as well , thanks a lot !!