Simplify annotation data passing

This commit is contained in:
Tim van der Meij 2015-07-18 17:52:03 +02:00
parent 91ab010829
commit 995c5ba205
3 changed files with 5 additions and 17 deletions

View file

@ -688,13 +688,10 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
* annotation objects.
*/
getAnnotations: function PDFPageProxy_getAnnotations() {
if (this.annotationsPromise) {
return this.annotationsPromise;
if (!this.annotationsPromise) {
this.annotationsPromise = this.transport.getAnnotations(this.pageIndex);
}
var promise = this.transport.getAnnotations(this.pageIndex);
this.annotationsPromise = promise;
return promise;
return this.annotationsPromise;
},
/**
* Begins the process of rendering a page to the desired context.