mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
Bouton pour zoomer et dezoomer en mode mobile
This commit is contained in:
parent
33ddbb9e27
commit
5b2ae3a80e
@ -440,7 +440,13 @@ loadingTask.promise.then(function(pdf) {
|
||||
zoomChange(1)
|
||||
}
|
||||
}, { passive: false });
|
||||
|
||||
document.getElementById('btn-zoom-decrease').addEventListener('click', function() {
|
||||
zoomChange(-1)
|
||||
});
|
||||
document.getElementById('btn-zoom-increase').addEventListener('click', function() {
|
||||
zoomChange(1)
|
||||
});
|
||||
|
||||
var autoZoom = function() {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(resizePDF, 100);
|
||||
@ -543,6 +549,8 @@ loadingTask.promise.then(function(pdf) {
|
||||
viewport = page.getViewport({ scale: scale });
|
||||
}
|
||||
|
||||
currentScale = scale;
|
||||
|
||||
var pageIndex = page.pageNumber - 1;
|
||||
|
||||
document.getElementById('form_pdf').insertAdjacentHTML('beforeend', '<input name="svg[' + pageIndex + ']" id="data-svg-' + pageIndex + '" type="hidden" value="" />');
|
||||
|
@ -81,6 +81,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="position-fixed bottom-0 start-0 bg-white w-100 p-2 shadow d-md-none">
|
||||
<div class="btn-group position-absolute opacity-25" style="top: -46px;">
|
||||
<button id="btn-zoom-decrease" class="btn btn-secondary"><i class="bi bi-dash"></i></button>
|
||||
<button id="btn-zoom-increase" class="btn btn-secondary"><i class="bi bi-plus"></i></button>
|
||||
</div>
|
||||
<div class="d-grid gap-2">
|
||||
<button class="btn btn-primary" disabled="disabled" type="submit" id="save_mobile"><i class="bi bi-download"></i> Télécharger le PDF Signé</button>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user