1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Merge pull request #12505 from calixteman/12504

Split highlight annotation div into multiple divs
This commit is contained in:
Brendan Dahl 2020-11-04 10:41:28 -08:00 committed by GitHub
commit 1de2bc4816
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 75 additions and 18 deletions

View file

@ -2126,6 +2126,13 @@ class PopupAnnotation extends Annotation {
const rawParent = parameters.dict.getRaw("Parent");
this.data.parentId = isRef(rawParent) ? rawParent.toString() : null;
const parentRect = parentItem.getArray("Rect");
if (Array.isArray(parentRect) && parentRect.length === 4) {
this.data.parentRect = Util.normalizeRect(parentRect);
} else {
this.data.parentRect = [0, 0, 0, 0];
}
const rt = parentItem.get("RT");
if (isName(rt, AnnotationReplyType.GROUP)) {
// Subordinate annotations in a group should inherit