1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

Définition des normes d'édition

This commit is contained in:
Vincent LAURENT 2021-10-12 01:02:40 +02:00
parent 3a44c5a9b7
commit 21ff3c8ff7
2 changed files with 62 additions and 46 deletions

15
.editorconfig Normal file
View File

@ -0,0 +1,15 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
end_of_line = lf
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

View File

@ -50,6 +50,7 @@ loadingTask.promise.then(function(pdf) {
} }
var storeCollections = function () { var storeCollections = function () {
console.log('store');
localStorage.setItem('svgCollections', JSON.stringify(svgCollections)); localStorage.setItem('svgCollections', JSON.stringify(svgCollections));
} }
@ -420,6 +421,7 @@ loadingTask.promise.then(function(pdf) {
width: 300, width: 300,
fontSize: 20 fontSize: 20
}); });
canvas.add(textbox).setActiveObject(textbox); canvas.add(textbox).setActiveObject(textbox);
textbox.enterEditing(); textbox.enterEditing();
textbox.selectAll(); textbox.selectAll();
@ -466,6 +468,7 @@ loadingTask.promise.then(function(pdf) {
zoomChange(1) zoomChange(1)
} }
}, { passive: false }); }, { passive: false });
document.getElementById('btn-zoom-decrease').addEventListener('click', function() { document.getElementById('btn-zoom-decrease').addEventListener('click', function() {
zoomChange(-1) zoomChange(-1)
}); });
@ -495,8 +498,6 @@ loadingTask.promise.then(function(pdf) {
clearTimeout(resizeTimeout); clearTimeout(resizeTimeout);
currentScale += deltaScale; currentScale += deltaScale;
console.log(currentScale);
resizeTimeout = setTimeout(resizePDF(currentScale), 50); resizeTimeout = setTimeout(resizePDF(currentScale), 50);
} }