refactor(app): simplify annotation creation and improve signature handling
- Updated `createImageAnnotation` to use pre-generated id instead of multiple parameters - Replaced hardcoded annotation ID generation during signature creation - Added `fixBase64` helper to handle escaped base64 strings - Temporarily added logging in `handleFinish` for debugging exported InstantJSON - Simplified `createImageAnnotation` signature and usage - Improved readability and consistency in annotation ID generation logic
This commit is contained in:
@@ -217,9 +217,9 @@ function isSignature(annotation) {
|
||||
return !!annotation.isSignature || annotation.description == 'FRAME'
|
||||
}
|
||||
|
||||
function createImageAnnotation(boundingBox, pageIndex, imageAttachmentId, envelopeId, receiverId, elementId, annotationType) {
|
||||
function createImageAnnotation(boundingBox, pageIndex, imageAttachmentId, id) {
|
||||
const frameAnnotation = new PSPDFKit.Annotations.ImageAnnotation({
|
||||
id: generateId(envelopeId, receiverId, elementId, annotationType),
|
||||
id: id,
|
||||
pageIndex: pageIndex,
|
||||
isSignature: false,
|
||||
readOnly: true,
|
||||
|
||||
Reference in New Issue
Block a user