test scale
This commit is contained in:
parent
eae14bb93f
commit
0e74f38d16
|
@ -847,7 +847,7 @@
|
|||
enableXfa: ENABLE_XFA,
|
||||
disableFontFace: true
|
||||
});
|
||||
var pdfDoc = null, scale = 2.5;
|
||||
var pdfDoc = null, scale = window.devicePixelRatio || 1;
|
||||
const container = flipbook[0];
|
||||
flipbook.bind('zoom-min', function(){
|
||||
flipbook_container.find('.cmdZoomOut').addClass('disabled');
|
||||
|
@ -889,6 +889,7 @@
|
|||
var viewport = page.getViewport({ scale: scale });
|
||||
// Support HiDPI-screens.
|
||||
var outputScale = (window.devicePixelRatio || 1) / 4;
|
||||
outputScale = outputScale / viewport.width * flipbook.width();
|
||||
canvas.width = Math.floor(viewport.width * outputScale);
|
||||
canvas.height = Math.floor(viewport.height * outputScale);
|
||||
canvas.style.width = "100%";
|
||||
|
@ -1082,7 +1083,7 @@
|
|||
var viewport = page.getViewport({ scale: scale });
|
||||
// Support HiDPI-screens.
|
||||
var outputScale = window.devicePixelRatio || 1;
|
||||
|
||||
outputScale = outputScale / viewport.width * flipbook.width();
|
||||
canvas.width = Math.floor(viewport.width * outputScale);
|
||||
canvas.height = Math.floor(viewport.height * outputScale);
|
||||
canvas.style.width = "100%";
|
||||
|
|
Loading…
Reference in New Issue