1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Fix up bidi algorithm, and set direction of div to match text direction

This commit is contained in:
Adil Allawi 2012-02-13 02:10:41 +00:00
parent ffa0e082a4
commit 2bc708305d
3 changed files with 290 additions and 214 deletions

View file

@ -1084,7 +1084,8 @@ var TextLayerBuilder = function textLayerBuilder(textLayerDiv) {
textDiv.style.fontSize = fontHeight + 'px';
textDiv.style.left = text.geom.x + 'px';
textDiv.style.top = (text.geom.y - fontHeight) + 'px';
textDiv.textContent = text.str;
textDiv.textContent = bidi(text, -1);
textDiv.dir = text.direction;
textDiv.dataset.textLength = text.length;
this.textDivs.push(textDiv);
};