[Pkg-javascript-commits] [pdf.js] 124/204: Fix a regression preventing page change in the Stepper in the debugger

David Prévot taffit at moszumanska.debian.org
Sat Oct 25 18:50:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 7af46b433d576bf8f38142d56c74e3e63284ec1a
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Wed Sep 24 10:35:01 2014 +0200

    Fix a regression preventing page change in the Stepper in the debugger
    
    This is a regression from https://github.com/mozilla/pdf.js/commit/ddd3c8fc2fe7b8715bed6d6f146c206d133b5dd6, which prevents changing pages in the Stepper.
    
    (Apart from fixing the bug, for the sake of consistency, I also removed one instance of `parseInt`.)
---
 web/debugger.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/web/debugger.js b/web/debugger.js
index 2251682..81da232 100644
--- a/web/debugger.js
+++ b/web/debugger.js
@@ -211,6 +211,7 @@ var StepperManager = (function StepperManagerClosure() {
     },
     selectStepper: function selectStepper(pageIndex, selectPanel) {
       var i;
+      pageIndex = pageIndex | 0;
       if (selectPanel) {
         this.manager.selectPanel(this);
       }
@@ -419,7 +420,7 @@ var Stepper = (function StepperClosure() {
       var allRows = this.panel.getElementsByClassName('line');
       for (var x = 0, xx = allRows.length; x < xx; ++x) {
         var row = allRows[x];
-        if (parseInt(row.dataset.idx, 10) === idx) {
+        if ((row.dataset.idx | 0) === idx) {
           row.style.backgroundColor = 'rgb(251,250,207)';
           row.scrollIntoView();
         } else {

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