ctx.restore();
ctx.translate(-this.x * scale, -this.y * scale);
- this.content.startRendering(ctx,
- (function pageViewDrawCallback(error) {
- if (error)
- PDFView.error('An error occurred while rendering the page.', error);
- this.stats = content.bench;
- this.updateStats();
- if (this.onAfterDraw)
- this.onAfterDraw();
+ // Rendering area
+
+ var self = this;
- stats.begin = Date.now();
+ this.content.startRendering(ctx, function pageViewDrawCallback(error) {
+ div.removeChild(self.loadingIconDiv);
+
+ if (error)
+ PDFView.error('An error occurred while rendering the page.', error);
- cache.push(this);
- callback();
- }).bind(this), textLayer
- );
++ self.stats = content.bench;
+ self.updateStats();
+ if (self.onAfterDraw)
+ self.onAfterDraw();
+
+ cache.push(self);
+ callback();
+ }, textLayer);
setupAnnotations(this.content, this.scale);
div.setAttribute('data-loaded', true);