if (!item.drawingRequired())
return; // as no redraw required, no need for queueing.
- if ('rendering' in item)
- return; // is already in the queue
-
- item.rendering = true;
this.items.push(item);
if (this.items.length > 1)
return; // not first item
},
continueExecution: function RenderingQueueContinueExecution() {
var item = this.items.shift();
- delete item.rendering;
if (this.items.length == 0)
return; // queue is empty
var self = this;
stats.begin = Date.now();
this.content.startRendering(ctx, function pageViewDrawCallback(error) {
- div.removeChild(self.loadingIconDiv);
+ if (self.loadingIconDiv) {
+ div.removeChild(self.loadingIconDiv);
+ delete self.loadingIconDiv;
+ }
if (error)
PDFView.error('An error occurred while rendering the page.', error);
};
this.setImage = function thumbnailViewSetImage(img) {
- if (this.hasImage)
+ if (this.hasImage || !img)
return;
var ctx = getPageDrawContext();
updateViewarea();
}, true);
-
var thumbnailTimer;
function updateThumbViewArea() {