mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
[Editor] Add the ability to create/update the structure tree when saving a pdf containing newly added annotations (bug 1845087)
When there is no tree, the tags for the new annotions are just put under the root element. When there is a tree, we insert the new tags at the right place in using the value of structTreeParentId (added in PR #16916).
This commit is contained in:
parent
7f8de83e96
commit
a8573d4e1b
8 changed files with 613 additions and 14 deletions
|
@ -262,6 +262,14 @@ class Dict {
|
|||
|
||||
return mergedDict.size > 0 ? mergedDict : Dict.empty;
|
||||
}
|
||||
|
||||
clone() {
|
||||
const dict = new Dict(this.xref);
|
||||
for (const key of this.getKeys()) {
|
||||
dict.set(key, this.getRaw(key));
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
}
|
||||
|
||||
class Ref {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue