Skip to content

Commit

Permalink
file save dialog take 3
Browse files Browse the repository at this point in the history
  • Loading branch information
joric committed Aug 20, 2024
1 parent 93e531f commit af01052
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/qle.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,14 @@ function get_char_code(id, x, y) {
});

$('#download').on('click', function(e) {
var id = get_current_canvas_id();
document.getElementById(id).toBlob(blob=>{
showSaveFilePicker({suggestedName: id+'.png'}).then(f=>f.createWritable()).then(f=>(f.write(blob) && f.close()))
});
});


$('#download').on('click1', function(e) {
var id = get_current_canvas_id();
document.getElementById(id).toBlob(blob=>{
showSaveFilePicker({suggestedName: id+'.png'}).then(f=>f.createWritable()).then(f=>(t=f).write(blob)).then(f=>t.close());
Expand Down

0 comments on commit af01052

Please sign in to comment.