|
|
|
@ -1227,7 +1227,11 @@ var PDFPageView = (function PDFPageViewClosure() {
@@ -1227,7 +1227,11 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|
|
|
|
|
|
|
|
|
var canvas = document.createElement('canvas'); |
|
|
|
|
canvas.id = 'page' + this.id; |
|
|
|
|
// Keep the canvas hidden until the first draw callback, or until drawing
|
|
|
|
|
// is complete when `!this.renderingQueue`, to prevent black flickering.
|
|
|
|
|
canvas.setAttribute('hidden', 'hidden'); |
|
|
|
|
var isCanvasHidden = true; |
|
|
|
|
|
|
|
|
|
canvasWrapper.appendChild(canvas); |
|
|
|
|
if (this.annotationLayer && this.annotationLayer.div) { |
|
|
|
|
// annotationLayer needs to stay on top
|
|
|
|
@ -1235,7 +1239,6 @@ var PDFPageView = (function PDFPageViewClosure() {
@@ -1235,7 +1239,6 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|
|
|
|
} else { |
|
|
|
|
div.appendChild(canvasWrapper); |
|
|
|
|
} |
|
|
|
|
var isCanvasHidden = true; |
|
|
|
|
this.canvas = canvas; |
|
|
|
|
|
|
|
|
|
var ctx = canvas.getContext('2d', {alpha: false}); |
|
|
|
@ -1317,6 +1320,11 @@ var PDFPageView = (function PDFPageViewClosure() {
@@ -1317,6 +1320,11 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|
|
|
|
|
|
|
|
|
self.renderingState = RenderingStates.FINISHED; |
|
|
|
|
|
|
|
|
|
if (isCanvasHidden) { |
|
|
|
|
self.canvas.removeAttribute('hidden'); |
|
|
|
|
isCanvasHidden = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (self.loadingIconDiv) { |
|
|
|
|
div.removeChild(self.loadingIconDiv); |
|
|
|
|
delete self.loadingIconDiv; |
|
|
|
|