1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-23 08:38:06 +02:00

[Editor] Add the parent tag id (if any) to the serialized editors (bug 1845087)

The tag id will be useful in order to update the StructTree when saving
the pdf.
This commit is contained in:
Calixte Denizet 2023-09-07 18:02:55 +02:00
parent 3e32d87be7
commit c6f7e722c9
7 changed files with 69 additions and 8 deletions

View file

@ -409,7 +409,7 @@ class AnnotationEditorLayer {
}, 0);
}
this.#accessibilityManager?.moveElementInDOM(
editor._structTreeParentId = this.#accessibilityManager?.moveElementInDOM(
this.div,
editor.div,
editor.contentDiv,

View file

@ -80,6 +80,7 @@ class AnnotationEditor {
this.annotationElementId = null;
this._willKeepAspectRatio = false;
this._initialOptions.isCentered = parameters.isCentered;
this._structTreeParentId = null;
const {
rotation,

View file

@ -735,6 +735,7 @@ class FreeTextEditor extends AnnotationEditor {
pageIndex: this.pageIndex,
rect,
rotation: this.rotation,
structTreeParentId: this._structTreeParentId,
};
if (isForCopying) {

View file

@ -1199,6 +1199,7 @@ class InkEditor extends AnnotationEditor {
pageIndex: this.pageIndex,
rect,
rotation: this.rotation,
structTreeParentId: this._structTreeParentId,
};
}
}

View file

@ -506,6 +506,7 @@ class StampEditor extends AnnotationEditor {
rect: this.getRect(0, 0),
rotation: this.rotation,
isSvg: this.#isSvg,
structTreeParentId: this._structTreeParentId,
};
if (isForCopying) {