vue-pdf-eurlanda
Advanced tools
Comparing version 3.3.17 to 3.3.18
@@ -31,3 +31,3 @@ { | ||
"scripts": {}, | ||
"version": "3.3.17" | ||
"version": "3.3.18" | ||
} |
@@ -69,5 +69,2 @@ import resizeSensor from 'vue-resize-sensor' | ||
// check if the element is attached to the dom tree || resizeSensor being destroyed | ||
console.log("------------resize------------"); | ||
console.log(size); | ||
console.log(this.$el); | ||
if ( this.$el.parentNode === null || (size.width === 0 && size.height === 0) ) | ||
@@ -77,9 +74,9 @@ return; | ||
// on IE10- canvas height must be set | ||
this.pdf.setCanvasHeight(this.pdf.getCanvas().offsetWidth * (this.pdf.getCanvas().height / this.pdf.getCanvas().width) + 'px'); | ||
this.pdf.setCanvasHeight(size.width * (this.pdf.getCanvas().height / this.pdf.getCanvas().width) + 'px'); | ||
// update the page when the resolution is too poor | ||
var resolutionScale = this.pdf.getResolutionScale(); | ||
//if ( resolutionScale < 0.85 || resolutionScale > 1.15 ){ | ||
if ( resolutionScale < 0.85 || resolutionScale > 1.15 ){ | ||
this.pdf.renderPage(this.rotate); | ||
//} | ||
} | ||
@@ -86,0 +83,0 @@ |
@@ -61,3 +61,2 @@ import { CMapCompressionType } from 'pdfjs-dist/lib/shared/util'; | ||
canvasElt.style.width = "100%"; | ||
canvasElt.style.height = size.height; | ||
canvasParent.appendChild(canvasElt); | ||
@@ -93,4 +92,2 @@ | ||
this.getResolutionScale = function() { | ||
console.log("-----------getResolutionScale------------"); | ||
console.log(canvasElt.offsetWidth,canvasElt.width); | ||
return canvasElt.offsetWidth / canvasElt.width; | ||
@@ -97,0 +94,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28073
527