Hi I have used following code to download my diagram as Image, but it is giving partial image of partial diagram and not the full diagram.
Can you please guide me where am i going wrong.
const filename = 'newImage.png';
const aTag = document.createElement('a');
const imageData = diagram.makeImage({
scale: 1,
type: 'image/png',
background: 'white',
});
aTag.setAttribute('href', imageData.src);
aTag.setAttribute('download', filename);
aTag.style.display = 'none';
document.body.appendChild(aTag);
aTag.click();
document.body.removeChild(aTag);