1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-05-20 22:56:37 +02:00

In mobile mode the buttons are displayed in click on the page

This commit is contained in:
Vincent LAURENT 2022-05-18 01:42:41 +02:00
parent eb170fcd63
commit cfcd34829e

View file

@ -81,7 +81,18 @@ var loadPDF = async function(pdfBlob, filename, pdfIndex) {
document.getElementById('container-pages').insertAdjacentHTML('beforeend', pageHTML);
let canvasContainer = document.getElementById('canvas-container-' + pageIndex);
canvasContainer.addEventListener('click', function(e) {
if(!is_mobile()) {
return;
}
let checkbox = this.querySelector('input[type=checkbox].input-hover');
checkbox.checked = !checkbox.checked;
updatePageState(this);
});
canvasContainer.addEventListener('mouseenter', function(e) {
if(is_mobile()) {
return false;
}
this.querySelector('input[type=checkbox].input-hover').checked = true;
updatePageState(this);
});