Skip to content

Commit c18d6f0

Browse files
committed
Fixed image export.
1 parent b572d9b commit c18d6f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/ContentWrap.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,15 @@ export default class ContentWrap extends Component {
417417
async exportPngClickHandler(e) {
418418
const mountingPoint = this.frame.contentWindow.document.getElementById('diagram');
419419
// eslint-disable-next-line
420-
const png = await mountingPoint.children[0].__vue__.toBlob();
420+
const png = await mountingPoint.children[0].getElementsByClassName('sequence-diagram')[0].__vue__.toBlob();
421421
saveAs(png, 'zenuml.png');
422422
trackEvent('ui', 'downloadPng');
423423
}
424424

425425
async exportJpegClickHandler(e) {
426426
const mountingPoint = this.frame.contentWindow.document.getElementById('diagram');
427427
// eslint-disable-next-line
428-
const jpeg = await mountingPoint.children[0].__vue__.toJpeg();
428+
const jpeg = await mountingPoint.children[0].getElementsByClassName('sequence-diagram')[0].__vue__.toJpeg();
429429
saveAs(jpeg, 'zenuml.jpeg');
430430
trackEvent('ui', 'downloadJpeg');
431431
}

0 commit comments

Comments
 (0)