From 6c7e7df6dad89b931977f3144c2ac78d2cdb8cb8 Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Tue, 14 Feb 2012 23:06:16 -0600 Subject: [PATCH] linting --- src/fonts.js | 7 ++++--- web/viewer.js | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/fonts.js b/src/fonts.js index ea5f20d78..87330756d 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -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; } diff --git a/web/viewer.js b/web/viewer.js index ff857a943..dbb72202f 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -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