Move link creation logic to src/display/annotation_layer.js
Additionally simplify the div creation logic (it needs to happen only once, so it should not be in the for-loop) and remove/rename variables for shorter code.
This commit is contained in:
parent
2dc3ee38c0
commit
bce3214105
3 changed files with 56 additions and 62 deletions
|
@ -275,7 +275,7 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|||
}
|
||||
|
||||
if (redrawAnnotations && this.annotationLayer) {
|
||||
this.annotationLayer.setupAnnotations(this.viewport, 'display');
|
||||
this.annotationLayer.render(this.viewport, 'display');
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -507,7 +507,7 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|||
this.annotationLayer = this.annotationsLayerFactory.
|
||||
createAnnotationsLayerBuilder(div, this.pdfPage);
|
||||
}
|
||||
this.annotationLayer.setupAnnotations(this.viewport, 'display');
|
||||
this.annotationLayer.render(this.viewport, 'display');
|
||||
}
|
||||
div.setAttribute('data-loaded', true);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue