Skip to content

Commit

Permalink
Properly preserve position.nextPageRects when updating annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Sep 5, 2023
1 parent d99ed74 commit 69ab2cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/common/annotation-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ class AnnotationManager {
if (annotation.position) {
annotation.image = undefined;
}
// All parameters in the existing annotation position are preserved except nextPageRects
let deleteNextPageRects = !annotation.position?.nextPageRects;
// All properties in the existing annotation position are preserved except nextPageRects,
// which isn't preserved only when a new rects property is given
let deleteNextPageRects = annotation.rects && !annotation.position?.nextPageRects;
annotation = {
...existingAnnotation,
...annotation,
Expand Down

0 comments on commit 69ab2cb

Please sign in to comment.