[Pkg-javascript-commits] [pdf.js] 74/141: Fixes lint warning W018: confusing use of exclamation mark

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 22:40:31 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 a71a87a8213c2f1ee91aecae0ce1a3e113b9a615
Author: Tim van der Meij <timvandermeij at gmail.com>
Date:   Mon Apr 7 20:55:28 2014 +0200

    Fixes lint warning W018: confusing use of exclamation mark
---
 src/shared/annotation.js | 2 +-
 test/reporter.js         | 1 -
 web/page_view.js         | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/shared/annotation.js b/src/shared/annotation.js
index 7ae2b7a..69e723c 100644
--- a/src/shared/annotation.js
+++ b/src/shared/annotation.js
@@ -112,7 +112,7 @@ var Annotation = (function AnnotationClosure() {
           var isInvalid = false;
           var numPositive = 0;
           for (var i = 0; i < dashArrayLength; i++) {
-            if (!(+dashArray[i] >= 0)) {
+            if (+dashArray[i] < 0) {
               isInvalid = true;
               break;
             } else if (dashArray[i] > 0) {
diff --git a/test/reporter.js b/test/reporter.js
index 4c3275e..a9bcc8a 100644
--- a/test/reporter.js
+++ b/test/reporter.js
@@ -29,7 +29,6 @@ module.exports = {
 
       switch (err.code) {
         case 'W004': // variable is already defined
-        case 'W018': // confusing use of !
           break;
         default:
           len++;
diff --git a/web/page_view.js b/web/page_view.js
index d961079..07149ad 100644
--- a/web/page_view.js
+++ b/web/page_view.js
@@ -348,7 +348,7 @@ var PageView = function pageView(container, id, scale,
 
     var x = 0, y = 0;
     var width = 0, height = 0, widthScale, heightScale;
-    var changeOrientation = !!(this.rotation % 180);
+    var changeOrientation = (this.rotation % 180 === 0 ? false : true);
     var pageWidth = (changeOrientation ? this.height : this.width) /
       this.scale / CSS_UNITS;
     var pageHeight = (changeOrientation ? this.width : this.height) /

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