main
Mike Fix 8 years ago
parent 8697c2e683
commit 6e57d06d13

@ -35,11 +35,10 @@ class Index extends React.Component {
save () { save () {
// domtoimage.toPng(document.getElementById('container')) // domtoimage.toPng(document.getElementById('container'))
domtoimage.toJpeg(document.getElementById('container')) domtoimage.toPng(document.getElementById('container'))
.then((dataUrl) => { .then((dataUrl) => {
const link = document.createElement('a') const link = document.createElement('a')
// link.download = 'snippet.png' link.download = 'snippet.png'
link.download = 'snippet.jpeg'
link.href = dataUrl link.href = dataUrl
link.click() link.click()
}) })

Loading…
Cancel
Save