Merge pull request #6228 from LibreSign/fix/show-only-current-signer-position

fix: show only current signer's signature position
This commit is contained in:
Vitor Mattos 2025-12-16 22:43:29 -03:00 committed by GitHub
commit 6d52807e47
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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() {