[Pkg-javascript-commits] [pdf.js] 70/141: Append whitespace divs so matches still line up.

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 5ba674c9961976e991820b5adac730c6260847e3
Author: Brendan Dahl <brendan.dahl at gmail.com>
Date:   Thu Apr 10 14:01:21 2014 -0700

    Append whitespace divs so matches still line up.
---
 web/text_layer_builder.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/text_layer_builder.js b/web/text_layer_builder.js
index 40aa857..bd75abf 100644
--- a/web/text_layer_builder.js
+++ b/web/text_layer_builder.js
@@ -112,6 +112,7 @@ var TextLayerBuilder = function textLayerBuilder(options) {
   this.appendText = function textLayerBuilderAppendText(geom, styles) {
     var style = styles[geom.fontName];
     var textDiv = document.createElement('div');
+    this.textDivs.push(textDiv);
     if (!/\S/.test(geom.str)) {
       textDiv.dataset.isWhitespace = true;
       return;
@@ -140,7 +141,6 @@ var TextLayerBuilder = function textLayerBuilder(options) {
       textDiv.dataset.canvasWidth = geom.width * this.viewport.scale;
     }
 
-    this.textDivs.push(textDiv);
   };
 
   this.setTextContent = function textLayerBuilderSetTextContent(textContent) {

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