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

Copié collé du canva actif

This commit is contained in:
Vincent LAURENT 2021-09-21 09:03:10 +02:00
parent 8fc7f5f8a1
commit ca1a6eddd3
2 changed files with 6 additions and 7 deletions

View File

@ -79,12 +79,11 @@ loadingTask.promise.then(function(pdf) {
} }
if(event.ctrlKey && event.key == 'c') { if(event.ctrlKey && event.key == 'c') {
canvasEditions.forEach(function(canvasEdition, index) { if(!activeCanvas || !activeCanvas.getActiveObject()) {
if(!canvasEdition.getActiveObject()) { return;
return; }
} copiedObject = fabric.util.object.clone(activeCanvas.getActiveObject());
copiedObject = fabric.util.object.clone(canvasEdition.getActiveObject());
});
return; return;
} }

View File

@ -29,7 +29,7 @@
<div class="form-check form-switch float-end"><input class="form-check-input" type="radio" name="radio_signature" id="radio_signature_image"></div> <div class="form-check form-switch float-end"><input class="form-check-input" type="radio" name="radio_signature" id="radio_signature_image"></div>
<h5><i class="bi bi-image"></i> Image</h5> <h5><i class="bi bi-image"></i> Image</h5>
<div class="text-center"> <div class="text-center">
<img id="img-upload" class="d-none" style="max-height: 80px" src="" /> <img id="img-upload" class="d-none" style="max-height: 80px; max-width: 235px;" src="" />
</div> </div>
<form id="form-image-upload" action="/image2svg" method="POST" enctype="multipart/form-data"> <form id="form-image-upload" action="/image2svg" method="POST" enctype="multipart/form-data">
<input id="input-image-upload" class="form-control" name="image" type="file"> <input id="input-image-upload" class="form-control" name="image" type="file">