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

Let the two annotation factories use static methods

This corresponds to how other factories are implemented.
This commit is contained in:
Tim van der Meij 2017-08-27 00:30:00 +02:00
parent af10f8b586
commit 4f02857394
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
4 changed files with 48 additions and 53 deletions

View file

@ -316,10 +316,9 @@ var Page = (function PageClosure() {
get annotations() {
var annotations = [];
var annotationRefs = this.getInheritedPageProp('Annots') || [];
var annotationFactory = new AnnotationFactory();
for (var i = 0, n = annotationRefs.length; i < n; ++i) {
var annotationRef = annotationRefs[i];
var annotation = annotationFactory.create(this.xref, annotationRef,
var annotation = AnnotationFactory.create(this.xref, annotationRef,
this.pdfManager,
this.idFactory);
if (annotation) {