automatically start downloading the screenshot
This commit is contained in:
parent
b40a25eaa4
commit
b3dfc02647
2 changed files with 9 additions and 2 deletions
|
@ -7,6 +7,7 @@ import outdent from 'outdent'
|
||||||
import ImportDialogBox from '../../components/ImportDialogBox'
|
import ImportDialogBox from '../../components/ImportDialogBox'
|
||||||
|
|
||||||
import PasteInput from '../PasteInput'
|
import PasteInput from '../PasteInput'
|
||||||
|
import Map from '../Map'
|
||||||
|
|
||||||
const ImportDialog = {
|
const ImportDialog = {
|
||||||
openLightbox: null,
|
openLightbox: null,
|
||||||
|
@ -32,7 +33,7 @@ const ImportDialog = {
|
||||||
ImportDialog.openLightbox('import-dialog')
|
ImportDialog.openLightbox('import-dialog')
|
||||||
},
|
},
|
||||||
hide: function() {
|
hide: function() {
|
||||||
ImportDialog.closeLightbox('import-dialog')
|
ImportDialog.closeLightbox()
|
||||||
},
|
},
|
||||||
downloadScreenshot: function() {
|
downloadScreenshot: function() {
|
||||||
ImportDialog.hide()
|
ImportDialog.hide()
|
||||||
|
|
|
@ -264,8 +264,14 @@ const Map = {
|
||||||
|
|
||||||
var downloadMessage = outdent`
|
var downloadMessage = outdent`
|
||||||
Captured map screenshot!
|
Captured map screenshot!
|
||||||
<a href="${canvas.canvas.toDataURL()}" download="${filename}">DOWNLOAD</a>`
|
<a id="map-screenshot-download-link"
|
||||||
|
href="${canvas.canvas.toDataURL()}"
|
||||||
|
download="${filename}"
|
||||||
|
>
|
||||||
|
DOWNLOAD
|
||||||
|
</a>`
|
||||||
GlobalUI.notifyUser(downloadMessage)
|
GlobalUI.notifyUser(downloadMessage)
|
||||||
|
$('#map-screenshot-download-link').click()
|
||||||
},
|
},
|
||||||
uploadMapScreenshot: () => {
|
uploadMapScreenshot: () => {
|
||||||
const canvas = Map.getMapCanvasForScreenshots()
|
const canvas = Map.getMapCanvasForScreenshots()
|
||||||
|
|
Loading…
Add table
Reference in a new issue