Skip to content

Commit

Permalink
Don't select annotations behind a text annotation when clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtcode committed Dec 4, 2024
1 parent 0faca99 commit b9373b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/pdf/pdf-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,14 @@ class PDFView {
}
}

let selectedTextAnnotation = selectableAnnotations.find(
x => x.type === 'text'
&& x.id === this._selectedAnnotationIDs[0]
);
if (selectedTextAnnotation) {
return [selectedTextAnnotation];
}

selectableAnnotations.sort((a, b) => {
let aSize, bSize;

Expand Down

0 comments on commit b9373b3

Please sign in to comment.