feat(annotation): extend mapSignature to include FRAME annotations
- Updated `mapSignature` function to also map image/frame annotations. - For each annotation with `description === 'FRAME'`, add `name` and `value` based on corresponding attachment. - Preserves existing mapping of form fields, filtering out labels. - Ensures signature data and associated frames are returned in a structured object.
This commit is contained in:
parent
d6f17ec4e8
commit
4f463c27e6
@ -316,6 +316,11 @@ function mapSignature(iJSON) {
|
||||
field.elementId = Number(nameParts[2]);
|
||||
field.name = nameParts[3];
|
||||
return field;
|
||||
}),
|
||||
frames: iJSON.annotations.filter(annot => annot.description === 'FRAME').map((annot) => {
|
||||
annot.name = annot.description.toLowerCase();
|
||||
annot.value = iJSON.attachments[annot.imageAttachmentId]?.binary || null;
|
||||
return annot;
|
||||
})
|
||||
};
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user