mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 23:28:06 +02:00
Auto zoom landscape documents to fit their height
This commit is contained in:
parent
4834f1c289
commit
50a4510ab7
1 changed files with 3 additions and 1 deletions
|
@ -359,7 +359,9 @@ var PDFView = {
|
|||
scale = Math.min(pageWidthScale, pageHeightScale);
|
||||
break;
|
||||
case 'auto':
|
||||
scale = Math.min(MAX_AUTO_SCALE, pageWidthScale);
|
||||
var isLandscape = (currentPage.width > currentPage.height);
|
||||
var horizontalScale = isLandscape ? pageHeightScale : pageWidthScale;
|
||||
scale = Math.min(MAX_AUTO_SCALE, horizontalScale);
|
||||
break;
|
||||
default:
|
||||
console.error('pdfViewSetScale: \'' + value +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue