Skip to content

Commit

Permalink
GH-314 fix markup annotation popup placement regression.
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Corless committed Jan 30, 2024
1 parent 7079cd1 commit 7975324
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private Rectangle recalculateAnnotationBounds() {
Rectangle2D markupUserSpaceRectangle = markupAnnotationComponent.getAnnotation().getUserSpaceRectangle();
Rectangle annotationPageSpaceBounds =
Annotation.commonBoundsNormalization(new GeneralPath(markupUserSpaceRectangle), at);
Rectangle pageBounds = parentPageViewComponent.getBounds();
Rectangle pageBounds = parentPageViewComponent.getParent().getBounds();
annotationPageSpaceBounds.x += pageBounds.x;
annotationPageSpaceBounds.y += pageBounds.y;
return annotationPageSpaceBounds;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void refreshDirtyBounds() {
documentViewModel.getPageBoundary(),
documentViewModel.getViewRotation(),
documentViewModel.getViewZoom());
Rectangle pageBounds = parentPageViewComponent.getBounds();
Rectangle pageBounds = parentPageViewComponent.getParent().getBounds();
annotationPageSpaceBounds.x += pageBounds.x;
annotationPageSpaceBounds.y += pageBounds.y;
setBounds(annotationPageSpaceBounds);
Expand All @@ -194,7 +194,7 @@ public void refreshAnnotationRect() {
documentViewModel.getPageBoundary(),
documentViewModel.getViewRotation(),
documentViewModel.getViewZoom());
Rectangle pageBounds = parentPageViewComponent.getBounds();
Rectangle pageBounds = parentPageViewComponent.getParent().getBounds();
Rectangle bounds = getBounds();
bounds.x -= pageBounds.x;
bounds.y -= pageBounds.y;
Expand Down Expand Up @@ -517,7 +517,7 @@ public void replyToSelectedMarkupExecute() {
}

public AnnotationComponent getAnnotationParentComponent() {
return findAnnotationComponent(selectedMarkupAnnotation);
return findAnnotationComponent(annotation.getParent());
}

/**
Expand Down

0 comments on commit 7975324

Please sign in to comment.