[Pkg-javascript-commits] [pdf.js] 60/157: Remove the `currentScaleValue` getter from `PDFViewerApplication` (issue 6158)
David Prévot
taffit at moszumanska.debian.org
Tue Aug 11 06:46:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 1c0115a7e4cde6df76bfca9fa684fdfcd01916a1
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Tue Jul 7 09:17:05 2015 +0200
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.
---
web/viewer.js | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/web/viewer.js b/web/viewer.js
index 789e7c9..878379e 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -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--;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list