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

[Organization] 2 pages per line in mobile and fix scroll in backdrop div

This commit is contained in:
Vincent LAURENT 2022-10-08 10:57:39 +02:00
parent 7ae60e41a8
commit ed36de8bd6
2 changed files with 5 additions and 7 deletions

View File

@ -33,7 +33,7 @@ var isDraggedMode = function() {
var nbPagePerLine = 5;
if(is_mobile()) {
nbPagePerLine = 1;
nbPagePerLine = 2;
}
var pdfjsLib = window['pdfjs-dist/build/pdf'];
pdfjsLib.GlobalWorkerOptions.workerSrc = '/vendor/pdf.worker.js?legacy';
@ -523,9 +523,8 @@ var updateGlobalState = function() {
if(isDraggedMode()) {
document.querySelector('#top_bar').classList.add('d-none');
document.querySelector('#bottom_bar').classList.add('d-none');
document.querySelector('#backdrop_drag_mode').style.width = document.querySelector('body').scrollWidth+'px';
console.log(document.querySelector('#container-pages'));
document.querySelector('#backdrop_drag_mode').style.height = document.querySelector('body').scrollHeight+'px';
document.querySelector('#backdrop_drag_mode').style.width = document.querySelector('#container-pages').scrollWidth+'px';
document.querySelector('#backdrop_drag_mode').style.height = document.querySelector('#container-pages').scrollHeight+'px';
document.querySelector('#backdrop_drag_mode').classList.remove('d-none');
}
}

View File

@ -46,8 +46,8 @@
</div>
<div id="page-organization" style="padding-right: 350px;" class="d-none">
<div style="height: 65px;" class="d-md-none"></div>
<div id="backdrop_drag_mode" class="position-absolute bg-dark opacity-25 d-none"></div>
<div id="container-pages" class="col-12 pt-1 vh-100 d-flex align-content-start flex-wrap position-relative" style="overflow-y: scroll;">
<div id="backdrop_drag_mode" class="position-absolute bg-dark opacity-25 d-none"></div>
</div>
<div id="container-btn-zoom" class="btn-group-vertical position-fixed" style="top: 6px; right: 368px;">
<button id="btn-zoom-increase" class="btn btn-outline-dark bg-white text-dark"><i class="bi bi-zoom-in"></i></button>
@ -109,7 +109,6 @@
<button id="btn_delete_select_mobile" type="button" class="btn btn-outline-primary" style="border-top-right-radius: 0 !important;"><i class="bi bi-trash"></i> Supprimer</button>
</div>
</div>
<!--<button type=button class="btn btn-light float-end" data-bs-toggle="offcanvas" data-bs-target="#sidebarTools" aria-controls="sidebarTools"><i class="bi bi-list"></i></button>-->
</div>
<div id="bottom_bar" class="position-fixed bottom-0 start-0 bg-white w-100 p-2 shadow-sm d-md-none">
<div id="bottom_bar_action" class="d-grid gap-2">
@ -128,6 +127,6 @@
<script>
var maxSize = <?php echo $maxSize ?>;
</script>
<script src="/js/organization.js?202210080119"></script>
<script src="/js/organization.js?202210081057"></script>
</body>
</html>