|
|
@ -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()
|
|
|
|
})
|
|
|
|
})
|
|
|
|