|
@@ -996,12 +996,10 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|
|
}
|
|
|
div.removeAttribute('data-loaded');
|
|
|
|
|
|
- if (keepAnnotations) {
|
|
|
- if (this.annotationLayer) {
|
|
|
- // Hide annotationLayer until all elements are resized
|
|
|
- // so they are not displayed on the already-resized page
|
|
|
- this.annotationLayer.hide();
|
|
|
- }
|
|
|
+ if (currentAnnotationNode) {
|
|
|
+ // Hide annotationLayer until all elements are resized
|
|
|
+ // so they are not displayed on the already-resized page
|
|
|
+ this.annotationLayer.hide();
|
|
|
} else {
|
|
|
this.annotationLayer = null;
|
|
|
}
|
|
@@ -1172,7 +1170,7 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|
|
var canvas = document.createElement('canvas');
|
|
|
canvas.id = 'page' + this.id;
|
|
|
canvasWrapper.appendChild(canvas);
|
|
|
- if (this.annotationLayer) {
|
|
|
+ if (this.annotationLayer && this.annotationLayer.div) {
|
|
|
// annotationLayer needs to stay on top
|
|
|
div.insertBefore(canvasWrapper, this.annotationLayer.div);
|
|
|
} else {
|
|
@@ -1219,7 +1217,7 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|
|
textLayerDiv.className = 'textLayer';
|
|
|
textLayerDiv.style.width = canvas.style.width;
|
|
|
textLayerDiv.style.height = canvas.style.height;
|
|
|
- if (this.annotationLayer) {
|
|
|
+ if (this.annotationLayer && this.annotationLayer.div) {
|
|
|
// annotationLayer needs to stay on top
|
|
|
div.insertBefore(textLayerDiv, this.annotationLayer.div);
|
|
|
} else {
|