From 39c12ada45a64792edec5465cbb6eb239de6fcfb Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 28 Oct 2025 13:49:26 +0100 Subject: [PATCH] refactor(annotations): include bounding box info in mapped signature fields - Added `x`, `y`, `width`, and `height` properties to form field mapping in `mapSignature`. - Preserves original form field values while enriching them with annotation coordinates. - No functional changes to annotation creation, deletion, or validation. --- EnvelopeGenerator.Web/wwwroot/js/annotation.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/EnvelopeGenerator.Web/wwwroot/js/annotation.js b/EnvelopeGenerator.Web/wwwroot/js/annotation.js index 9bfa23ed..285ef94c 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/annotation.js +++ b/EnvelopeGenerator.Web/wwwroot/js/annotation.js @@ -321,11 +321,16 @@ function mapSignature(iJSON) { // formFields ...iJSON.formFieldValues.filter(field => !field.name.includes("label")).map((field) => { const nameParts = field.name.split('#'); + const [x, y, width, height] = iJSON.annotations.find(iAnnot => iAnnot.id === field.name)?.bbox; return { elementId: Number(nameParts[2]), name: nameParts[3], value: field.value, - type: field.type + type: field.type, + x: x, + y: y, + width: width, + height: height }; }),