vue-pdf-eurlanda
Advanced tools
Comparing version 1.0.13 to 1.0.14
{ | ||
"name": "vue-pdf-eurlanda", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "vue.js pdf viewer", | ||
@@ -5,0 +5,0 @@ "main": "src/vuePdfNoSss.vue", |
@@ -103,2 +103,3 @@ import resizeSensor from 'vue-resize-sensor' | ||
let docheight = document.getElementById(this.container).offsetHeight; | ||
console.log("loaded高度:" + docheight); | ||
this.pdf.setCanvasHeight(docheight + 'px'); | ||
@@ -105,0 +106,0 @@ this.pdf.loadPage(this.page, this.rotate); |
@@ -83,2 +83,3 @@ import { CMapCompressionType } from 'pdfjs-dist/lib/shared/util'; | ||
this.setCanvasHeight = function(h) { | ||
console.log("setCanvasHeight:" + h); | ||
canvasElt.style.height = h | ||
@@ -247,3 +248,5 @@ } | ||
canvasElt.height = viewport.height; | ||
console.log("给canvas赋值:" + viewport.height); | ||
canvasElt.style.width = viewport.width + "px"; | ||
canvasElt.style.height = viewport.height + "px"; | ||
pdfRender = pdfPage.render({ | ||
@@ -282,3 +285,3 @@ canvasContext: canvasElt.getContext('2d'), | ||
.then(function() { | ||
annotationLayerElt.style.visibility = ''; | ||
annotationLayerElt.style.display = 'none'; | ||
canceling = false; | ||
@@ -285,0 +288,0 @@ pdfRender = null; |
32761
540