fix(annotations): correct signature frame mapping by filtering by pageIndex

- Updated `mapSignature` to filter signature annotations by `pageIndex` when finding nearest elements.
- Ensures correct association of frames and signature data for each page.
- Prevents errors caused by cross-page annotation references.
This commit is contained in:
2025-10-28 12:59:49 +01:00
parent 5e74de0ce7
commit 038ac2aed0
3 changed files with 8 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ function detailedCurrentDate() {
}).format();
}
function findNearest(origin, getX, getY, ...dests) {
function findNearest(origin, getX, getY, dests) {
const distanceToOrigin = (point) => Math.sqrt((getX(origin) - getX(point))**2 + (getY(origin) - getY(point))**2);
return dests.reduce(
(nearest, dest) => {