mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Add a getDocId
method to the idFactory
, in Page
instances, to avoid passing around PDFManager
instances unnecessarily (PR 7941 follow-up)
This way we can avoid manually building a "document id" in multiple places in `evaluator.js`, and it also let's us avoid passing in an otherwise unnecessary `PDFManager` instance when creating a `PartialEvaluator`.
This commit is contained in:
parent
55d9b35d37
commit
34952b732e
7 changed files with 36 additions and 46 deletions
|
@ -50,7 +50,7 @@ class AnnotationFactory {
|
|||
if (!isDict(dict)) {
|
||||
return;
|
||||
}
|
||||
let id = isRef(ref) ? ref.toString() : 'annot_' + idFactory.createObjId();
|
||||
let id = isRef(ref) ? ref.toString() : `annot_${idFactory.createObjId()}`;
|
||||
|
||||
// Determine the annotation's subtype.
|
||||
let subtype = dict.get('Subtype');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue