mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
Stockage des élément de signature dans le localstorage
This commit is contained in:
parent
9ef0c003e8
commit
9ba7fee244
@ -16,6 +16,11 @@ loadingTask.promise.then(function(pdf) {
|
|||||||
var activeCanvasPointer = null;
|
var activeCanvasPointer = null;
|
||||||
var canvasEditions = [];
|
var canvasEditions = [];
|
||||||
var svgCollections = [];
|
var svgCollections = [];
|
||||||
|
|
||||||
|
if(localStorage.getItem('svgCollections')) {
|
||||||
|
svgCollections = JSON.parse(localStorage.getItem('svgCollections'));
|
||||||
|
console.log(svgCollections);
|
||||||
|
}
|
||||||
|
|
||||||
opentype.load('/vendor/fonts/Caveat-Regular.ttf', function(err, font) {
|
opentype.load('/vendor/fonts/Caveat-Regular.ttf', function(err, font) {
|
||||||
fontCaveat = font;
|
fontCaveat = font;
|
||||||
@ -69,8 +74,8 @@ loadingTask.promise.then(function(pdf) {
|
|||||||
svgCollections.push(document.getElementById('img-upload').src);
|
svgCollections.push(document.getElementById('img-upload').src);
|
||||||
}
|
}
|
||||||
displaysSVG();
|
displaysSVG();
|
||||||
|
|
||||||
document.querySelector('#svg_list label:last-child').click();
|
document.querySelector('#svg_list label:last-child').click();
|
||||||
|
localStorage.setItem('svgCollections', JSON.stringify(svgCollections));
|
||||||
});
|
});
|
||||||
|
|
||||||
function dataURLtoBlob(dataurl) {
|
function dataURLtoBlob(dataurl) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user