function PDFPageProxy(pageInfo, transport) {
this.pageInfo = pageInfo;
this.transport = transport;
- this._stats = new StatTimer();
+ this.stats = new StatTimer();
this.objs = transport.objs;
}
PDFPageProxy.prototype = {
get rotate() {
return this.pageInfo.rotate;
},
- get stats() {
- return this._stats;
- },
get ref() {
return this.pageInfo.ref;
},
});
}
- var callback = (function complete(error) {
- if (error)
- promise.reject(error);
- else
- promise.resolve();
- });
+ function complete(error) {
+ if (error)
+ promise.reject(error);
+ else
+ promise.resolve();
+ };
// Once the operatorList and fonts are loaded, do the actual rendering.
this.displayReadyPromise.then(
var gfx = new CanvasGraphics(renderContext.canvasContext,
this.objs, renderContext.textLayer);
try {
- this.display(gfx, renderContext.viewport, callback);
+ this.display(gfx, renderContext.viewport, complete);
} catch (e) {
- if (callback)
- callback(e);
- else
- error(e);
+ complete(e);
}
}.bind(this),
function pageDisplayReadPromiseError(reason) {
- if (callback)
- callback(reason);
- else
- error(reason);
+ complete(reason);
}
);