mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Remove the currentScaleValue
getter from PDFViewerApplication
(issue 6158)
*The next step towards fixing issue 6158.* We can just as well access `pdfViewer.currentScaleValue` directly in `PDFViewerApplication`, instead of having a helper function which just acts as a wrapper for it.
This commit is contained in:
parent
eb2ad11571
commit
1c0115a7e4
1 changed files with 3 additions and 7 deletions
|
@ -312,10 +312,6 @@ var PDFViewerApplication = {
|
|||
this.setScale(newScale, true);
|
||||
},
|
||||
|
||||
get currentScaleValue() {
|
||||
return this.pdfViewer.currentScaleValue;
|
||||
},
|
||||
|
||||
get pagesCount() {
|
||||
return this.pdfDocument.numPages;
|
||||
},
|
||||
|
@ -1964,7 +1960,7 @@ window.addEventListener('keydown', function keydown(evt) {
|
|||
case 33: // pg up
|
||||
case 8: // backspace
|
||||
if (!isViewerInPresentationMode &&
|
||||
PDFViewerApplication.currentScaleValue !== 'page-fit') {
|
||||
pdfViewer.currentScaleValue !== 'page-fit') {
|
||||
break;
|
||||
}
|
||||
/* in presentation mode */
|
||||
|
@ -1995,7 +1991,7 @@ window.addEventListener('keydown', function keydown(evt) {
|
|||
case 34: // pg down
|
||||
case 32: // spacebar
|
||||
if (!isViewerInPresentationMode &&
|
||||
PDFViewerApplication.currentScaleValue !== 'page-fit') {
|
||||
pdfViewer.currentScaleValue !== 'page-fit') {
|
||||
break;
|
||||
}
|
||||
/* falls through */
|
||||
|
@ -2040,7 +2036,7 @@ window.addEventListener('keydown', function keydown(evt) {
|
|||
switch (evt.keyCode) {
|
||||
case 32: // spacebar
|
||||
if (!isViewerInPresentationMode &&
|
||||
PDFViewerApplication.currentScaleValue !== 'page-fit') {
|
||||
pdfViewer.currentScaleValue !== 'page-fit') {
|
||||
break;
|
||||
}
|
||||
PDFViewerApplication.page--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue