From 6de7b55668174f9d9c0981e1573ee6c5e8f1b782 Mon Sep 17 00:00:00 2001 From: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> Date: Tue, 16 Dec 2025 22:41:28 -0300 Subject: [PATCH] fix: show only current signer's signature position When viewing a document to sign, users should only see their own signature positions, not the positions of other signers. This improves UX and privacy by filtering to show only the signature elements for the current signer (where signer.me === true). Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com> --- src/views/SignPDF/SignPDF.vue | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/views/SignPDF/SignPDF.vue b/src/views/SignPDF/SignPDF.vue index bb0c89838..1e5786891 100644 --- a/src/views/SignPDF/SignPDF.vue +++ b/src/views/SignPDF/SignPDF.vue @@ -136,18 +136,17 @@ export default { this.pdfBlob = new File([blob], 'arquivo.pdf', { type: 'application/pdf' }) }, updateSigners(data) { - this.signStore.document.signers.forEach(signer => { - if (signer.visibleElements.length > 0) { - signer.visibleElements.forEach(element => { - const object = structuredClone(signer) - object.readOnly = true - element.coordinates.ury = Math.round(data.measurement[element.coordinates.page].height) - - element.coordinates.ury - object.element = element - this.$refs.pdfEditor.addSigner(object) - }) - } - }) + const currentSigner = this.signStore.document.signers.find(signer => signer.me) + if (currentSigner && currentSigner.visibleElements.length > 0) { + currentSigner.visibleElements.forEach(element => { + const object = structuredClone(currentSigner) + object.readOnly = true + element.coordinates.ury = Math.round(data.measurement[element.coordinates.page].height) + - element.coordinates.ury + object.element = element + this.$refs.pdfEditor.addSigner(object) + }) + } this.signStore.mounted = true }, toggleSidebar() {