refactor(annotations): replace global element index with element.id in generateId

- Removed global __elementIndex counter and updated generateId() to use element.id for unique annotation IDs.
- Updated createAnnotations() and createImageAnnotation() to pass element.id to generateId().
- Simplified ID generation logic for better consistency and traceability across annotations.
This commit is contained in:
2025-10-17 09:33:58 +02:00
parent 16e5d5c692
commit f046be240b
3 changed files with 17 additions and 20 deletions

View File

@@ -90,6 +90,7 @@ class App {
imageAttachmentId,
this.envelopeReceiver.envelopeId,
this.envelopeReceiver.receiverId,
this.fakeElementId--,
'signature'
)
@@ -281,11 +282,7 @@ class App {
.map(a => a.toJS())
.filter(a => a.isSignature)
if (totalSignatures > filtered.length) {
return false
} else {
return true
}
return totalSignatures <= filtered.length
}
async handleReset(event) {
@@ -302,4 +299,6 @@ class App {
return result
}
fakeElementId = 0;
}