Open nidhigoel-aq opened 1 month ago
let chart_data = await domtoimage.toPng(document.getElementById('chart'), { width: clientwidth, height: container.clientHeight * scale, filter: (node: Node) => node !== action1 && node !== action2 && node !== action3 && node !== action4 && node !== action5 && node !== action7, style: { transform: 'scale(' + scale + ')' } } );
saveAs(chart_data, chartName + '.png');
I use this code to save element as png. It works well on all browsers except when Safari is zoomed in. Some elements tend to shift while downloading in such a case.
Is there something I'm doing wrong?
No error in console.
Safari version 17.5
你好,我已收到你的来信。辛苦了!!
Code
let chart_data = await domtoimage.toPng(document.getElementById('chart'), { width: clientwidth, height: container.clientHeight * scale, filter: (node: Node) => node !== action1 && node !== action2 && node !== action3 && node !== action4 && node !== action5 && node !== action7, style: { transform: 'scale(' + scale + ')' } } );
saveAs(chart_data, chartName + '.png');
Expected Image
Safari image
Issue
I use this code to save element as png. It works well on all browsers except when Safari is zoomed in. Some elements tend to shift while downloading in such a case.
Is there something I'm doing wrong?
No error in console.
Browsers
Safari version 17.5