From fddb04753f63ed132656797e3759a806a9696402 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Wed, 2 Oct 2024 12:51:39 +0300 Subject: [PATCH] Preserve unknown position properties when merging ink annotations --- src/common/annotation-manager.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/annotation-manager.js b/src/common/annotation-manager.js index 6ab41444..1813989d 100644 --- a/src/common/annotation-manager.js +++ b/src/common/annotation-manager.js @@ -257,7 +257,8 @@ class AnnotationManager { let width = [...widthMap.entries()].sort((a, b) => b[1] - a[1])[0][0]; annotation.position = { - pageIndex: annotations[0].position.pageIndex, + // Preserve pageIndex and potentially other unknown properties + ...annotations[0].position, width, paths: annotations.flatMap(x => x.position.paths) };