Skip to content

Commit

Permalink
Fixed export Png and Jpeg.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCoder committed Aug 22, 2022
1 parent 33f2460 commit 6eee615
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ContentWrap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,15 @@ export default class ContentWrap extends Component {
async exportPngClickHandler(e) {
const mountingPoint = this.frame.contentWindow.document.getElementById('diagram');
// eslint-disable-next-line
const png = await mountingPoint.getElementsByClassName('frame')[0].__vue__.toBlob();
const png = await mountingPoint.getElementsByClassName('frame')[0].parentElement.__vue__.toBlob();
saveAs(png, 'zenuml.png');
trackEvent('ui', 'downloadPng');
}

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

0 comments on commit 6eee615

Please sign in to comment.