mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +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);
|
document.getElementById('container-pages').insertAdjacentHTML('beforeend', pageHTML);
|
||||||
|
|
||||||
let canvasContainer = document.getElementById('canvas-container-' + pageIndex);
|
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) {
|
canvasContainer.addEventListener('mouseenter', function(e) {
|
||||||
|
if(is_mobile()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
this.querySelector('input[type=checkbox].input-hover').checked = true;
|
this.querySelector('input[type=checkbox].input-hover').checked = true;
|
||||||
updatePageState(this);
|
updatePageState(this);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user