]> git.parisson.com Git - pdf.js.git/commitdiff
linting
authornotmasteryet <async.processingjs@yahoo.com>
Wed, 15 Feb 2012 05:06:16 +0000 (23:06 -0600)
committernotmasteryet <async.processingjs@yahoo.com>
Wed, 15 Feb 2012 05:06:16 +0000 (23:06 -0600)
src/fonts.js
web/viewer.js

index ea5f20d78286a4d855889832ff6774d10763ffd9..87330756dcf78eaef1a12191da6ecaf34bb30567 100644 (file)
@@ -1790,8 +1790,8 @@ var Font = (function FontClosure() {
         for (var i = 1; i < numGlyphs; i++) {
           var cid = gidToCidMap[i] || i;
           var unicode = this.toFontChar[cid];
-          if (!unicode || typeof unicode !== 'number' || isSpecialUnicode(unicode) ||
-              unicode in usedUnicodes) {
+          if (!unicode || typeof unicode !== 'number' ||
+              isSpecialUnicode(unicode) || unicode in usedUnicodes) {
             unassignedUnicodeItems.push(i);
             continue;
           }
@@ -1837,7 +1837,8 @@ var Font = (function FontClosure() {
             var usedUnicodes = [], unassignedUnicodeItems = [];
             for (var i = 0, ii = glyphs.length; i < ii; i++) {
               var unicode = toFontChar[i + 1];
-              if (!unicode || typeof unicode !== 'number' || unicode in usedUnicodes) {
+              if (!unicode || typeof unicode !== 'number' ||
+                  unicode in usedUnicodes) {
                 unassignedUnicodeItems.push(i);
                 continue;
               }
index ff857a9436105a8ff8d67eccb8a58caaf3b3a681..dbb72202f88242eb1d77a76646fe633f16465252 100644 (file)
@@ -1044,9 +1044,9 @@ var TextLayerBuilder = function textLayerBuilder(textLayerDiv) {
           // Adjust div width to match canvas text
           // Due to the .offsetWidth calls, this is slow
           // This needs to come after appending to the DOM
-          CustomStyle.setProp('transform' , textDiv, 'scale('
-            + textDiv.dataset.canvasWidth/textDiv.offsetWidth
-            + ',1)');
+          var textScale = textDiv.dataset.canvasWidth / textDiv.offsetWidth;
+          CustomStyle.setProp('transform' , textDiv,
+            'scale(' + textScale + ', 1)');
           CustomStyle.setProp('transformOrigin' , textDiv, '0% 0%');
         }
       } // textLength > 0