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:
parent
eb170fcd63
commit
cfcd34829e
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue