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

Right margin on mobile adjust

This commit is contained in:
Vincent LAURENT 2022-05-25 01:08:19 +02:00
parent bc4bded932
commit 0739e2e7c3

View File

@ -164,10 +164,14 @@ var pageRenderAll = function() {
} }
var pageRender = async function(pageIndex) { var pageRender = async function(pageIndex) {
let scrollWidth = 12;
if(is_mobile()) {
scrollWidth = -4;
}
let page = pages[pageIndex]; let page = pages[pageIndex];
let rotation = parseInt(document.querySelector('#input_rotate_'+pageIndex).value); let rotation = parseInt(document.querySelector('#input_rotate_'+pageIndex).value);
let viewport = page.getViewport({scale: 1, rotation: rotation}); let viewport = page.getViewport({scale: 1, rotation: rotation});
let sizeWidth = Math.floor((document.getElementById('container-pages').offsetWidth - (8*(nbPagePerLine+1)) - 12) / nbPagePerLine); let sizeWidth = Math.floor((document.getElementById('container-pages').offsetWidth - (8*(nbPagePerLine+1)) - scrollWidth) / nbPagePerLine);
let sizeHeight = sizeWidth * 1.25; let sizeHeight = sizeWidth * 1.25;
let scaleWidth = sizeWidth / viewport.width; let scaleWidth = sizeWidth / viewport.width;
let scaleHeight = sizeHeight / viewport.height; let scaleHeight = sizeHeight / viewport.height;