Skip to content

Commit 6eee615

Browse files
committed
Fixed export Png and Jpeg.
1 parent 33f2460 commit 6eee615

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
@@ -447,15 +447,15 @@ export default class ContentWrap extends Component {
447447
async exportPngClickHandler(e) {
448448
const mountingPoint = this.frame.contentWindow.document.getElementById('diagram');
449449
// eslint-disable-next-line
450-
const png = await mountingPoint.getElementsByClassName('frame')[0].__vue__.toBlob();
450+
const png = await mountingPoint.getElementsByClassName('frame')[0].parentElement.__vue__.toBlob();
451451
saveAs(png, 'zenuml.png');
452452
trackEvent('ui', 'downloadPng');
453453
}
454454

455455
async exportJpegClickHandler(e) {
456456
const mountingPoint = this.frame.contentWindow.document.getElementById('diagram');
457457
// eslint-disable-next-line
458-
const jpeg = await mountingPoint.getElementsByClassName('frame')[0].__vue__.toJpeg();
458+
const jpeg = await mountingPoint.getElementsByClassName('frame')[0].parentElement.__vue__.toJpeg();
459459
saveAs(jpeg, 'zenuml.jpeg');
460460
trackEvent('ui', 'downloadJpeg');
461461
}

0 commit comments

Comments
 (0)