mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
js for btn save for sharing action
This commit is contained in:
parent
7732ed4447
commit
8943efaf08
@ -748,6 +748,18 @@ var createEventsListener = function() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(document.getElementById('save_share')) {
|
||||||
|
document.getElementById('save_share').addEventListener('click', function(event) {
|
||||||
|
var dataTransfer = new DataTransfer();
|
||||||
|
canvasEditions.forEach(function(canvasEdition, index) {
|
||||||
|
dataTransfer.items.add(new File([canvasEdition.toSVG()], index+'.svg', {
|
||||||
|
type: 'image/svg+xml'
|
||||||
|
}));
|
||||||
|
})
|
||||||
|
document.getElementById('input_svg_share').files = dataTransfer.files;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('save_mobile').addEventListener('click', function(event) {
|
document.getElementById('save_mobile').addEventListener('click', function(event) {
|
||||||
document.getElementById('save').click();
|
document.getElementById('save').click();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user