mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
Lors du mode "Garder la séléction active" il est aussi possible de
désactiver l'ajout avec un simple clique
This commit is contained in:
parent
e2248fb436
commit
9f8d0b2fa1
@ -143,22 +143,22 @@ loadingTask.promise.then(function(pdf) {
|
||||
document.getElementById(this.htmlFor).dispatchEvent(new Event("change"));
|
||||
});
|
||||
svgButton.addEventListener('click', function(event) {
|
||||
if(event.detail > 1){
|
||||
if(event.detail > 1 && document.getElementById(this.htmlFor).checked){
|
||||
stateAddLock(true);
|
||||
}
|
||||
if(event.detail > 1 && !document.getElementById(this.htmlFor).checked){
|
||||
stateAddLock(false);
|
||||
}
|
||||
if(event.detail > 1) {
|
||||
return;
|
||||
}
|
||||
if(!document.getElementById(this.htmlFor).checked) {
|
||||
return;
|
||||
}
|
||||
if(addLock) {
|
||||
return;
|
||||
}
|
||||
document.getElementById(this.htmlFor).checked = false;
|
||||
document.getElementById(this.htmlFor).dispatchEvent(new Event("change"));
|
||||
event.preventDefault();
|
||||
});
|
||||
svgButton.addEventListener('dblclick', function(event) {
|
||||
stateAddLock(!addLock);
|
||||
});
|
||||
var svgImg = document.createElement('img');
|
||||
svgImg.src = svg.svg;
|
||||
svgImg.draggable = false;
|
||||
|
Loading…
Reference in New Issue
Block a user