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

Si on clique dans une div ça annule l'objet séléctionné

This commit is contained in:
Vincent LAURENT 2021-11-08 23:01:16 +01:00
parent bd3daccf82
commit af19a4ff93

View File

@ -464,6 +464,19 @@ loadingTask.promise.then(function(pdf) {
deleteActiveObject();
});
document.addEventListener('click', function(event) {
if(event.target.nodeName == "DIV") {
var input_selected = document.querySelector('input[name="svg_2_add"]:checked');
if(!input_selected) {
return;
}
stateAddLock(false);
input_selected.checked = false;
input_selected.dispatchEvent(new Event("change"));
}
});
var deleteActiveObject = function() {
canvasEditions.forEach(function(canvasEdition, index) {
canvasEdition.getActiveObjects().forEach(function(activeObject) {