[Pkg-javascript-commits] [pdf.js] 110/157: Move handling of the 'custom' scale value from pdf_viewer.js to viewer.js

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 06:46:45 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 93d82e21d5f3b13a6b713b303c9dc4c723c30a2a
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Sat Jul 18 10:12:31 2015 +0200

    Move handling of the 'custom' scale value from pdf_viewer.js to viewer.js
    
    The special handling of the 'custom' scale value is only relevant for the `scaleSelect` dropdown in the standard viewer, hence I think that it should be placed in `viewer.js` instead.
---
 web/pdf_viewer.js | 3 ---
 web/viewer.js     | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/web/pdf_viewer.js b/web/pdf_viewer.js
index f5cfda2..c9f7d26 100644
--- a/web/pdf_viewer.js
+++ b/web/pdf_viewer.js
@@ -415,9 +415,6 @@ var PDFViewer = (function pdfViewer() {
     },
 
     _setScale: function pdfViewer_setScale(value, noScroll) {
-      if (value === 'custom') {
-        return;
-      }
       var scale = parseFloat(value);
 
       if (scale > 0) {
diff --git a/web/viewer.js b/web/viewer.js
index 758281f..fc6e8f3 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -1440,6 +1440,9 @@ function webViewerInitialized() {
   });
 
   document.getElementById('scaleSelect').addEventListener('change', function() {
+    if (this.value === 'custom') {
+      return;
+    }
     PDFViewerApplication.pdfViewer.currentScaleValue = this.value;
   });
 

-- 
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