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:
parent
3e32d87be7
commit
c6f7e722c9
7 changed files with 69 additions and 8 deletions
|
@ -409,7 +409,7 @@ class AnnotationEditorLayer {
|
|||
}, 0);
|
||||
}
|
||||
|
||||
this.#accessibilityManager?.moveElementInDOM(
|
||||
editor._structTreeParentId = this.#accessibilityManager?.moveElementInDOM(
|
||||
this.div,
|
||||
editor.div,
|
||||
editor.contentDiv,
|
||||
|
|
|
@ -80,6 +80,7 @@ class AnnotationEditor {
|
|||
this.annotationElementId = null;
|
||||
this._willKeepAspectRatio = false;
|
||||
this._initialOptions.isCentered = parameters.isCentered;
|
||||
this._structTreeParentId = null;
|
||||
|
||||
const {
|
||||
rotation,
|
||||
|
|
|
@ -735,6 +735,7 @@ class FreeTextEditor extends AnnotationEditor {
|
|||
pageIndex: this.pageIndex,
|
||||
rect,
|
||||
rotation: this.rotation,
|
||||
structTreeParentId: this._structTreeParentId,
|
||||
};
|
||||
|
||||
if (isForCopying) {
|
||||
|
|
|
@ -1199,6 +1199,7 @@ class InkEditor extends AnnotationEditor {
|
|||
pageIndex: this.pageIndex,
|
||||
rect,
|
||||
rotation: this.rotation,
|
||||
structTreeParentId: this._structTreeParentId,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -506,6 +506,7 @@ class StampEditor extends AnnotationEditor {
|
|||
rect: this.getRect(0, 0),
|
||||
rotation: this.rotation,
|
||||
isSvg: this.#isSvg,
|
||||
structTreeParentId: this._structTreeParentId,
|
||||
};
|
||||
|
||||
if (isForCopying) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue