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

Merge pull request #8828 from timvandermeij/es6-annotations

Improve the annotation code by converting to ES6 syntax and removing duplicate code
This commit is contained in:
Tim van der Meij 2017-08-31 00:02:07 +02:00 committed by GitHub
commit a4cc85fc5f
5 changed files with 1402 additions and 1682 deletions

File diff suppressed because it is too large Load diff

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) {