Commit Graph

35 Commits

Author SHA1 Message Date
Jonas Jenwald
3f061cef86 Add a |textlayerrendered| event 2015-01-06 17:57:32 +01:00
Yury Delendik
2565e627a3 Refactors draw method in PDFPageView; makes optional some PDFPageViewOptions options 2014-12-20 23:41:34 -06:00
Yury Delendik
2ac7ac4678 Removes lastScrollSource and isViewerInPresentationMode from TextLayerBuilderOptions 2014-12-20 11:14:13 -06:00
Yury Delendik
a89bba35b2 Adds types definitions (jsdoc) for the PDFViewer code. 2014-09-28 10:39:56 -05:00
Nicholas Nethercote
cd61aad24f Don't scale single-char text divs.
This change makes scrolling noticeably smoother on files with many
single-char text divs, such as the one in #1045. The trade-off is that
the visual appearance of text selection in such documents is slightly
worse, because more text divs overlap.

This change also uses `scaleX(N)` instead of `scale(N, 1)`. This might
be marginally more efficient in terms of JS string concatenation.
2014-08-20 19:34:33 -07:00
Fabian Lange
6a0aa2cf49 Set transformOrigin for text layer in css.
transformOrigin is set to 0% 0% in all cases. This adds extra memory
impact into the dom tree. It also involves the CustomStyles workaround
to determine the correct css rule for the browser.
By setting all vendor and standard variants in css, the rule is applied
without the dom memory overhead and without the minor computation
overhead to set the value.
2014-08-19 22:46:09 +02:00
Yury Delendik
4ef70588de Merge pull request #5193 from nnethercote/data-font-name
Only use data-font-name attributes when necessary.
2014-08-18 13:54:07 -05:00
Nicholas Nethercote
eda7dcbb9e Only use data-font-name attributes when necessary.
The data-font-name attribute of textLayer divs are only used by the Font
Inspector. This change ensures they are only present when the pdfBug
tools are enabled.
2014-08-17 15:56:11 -07:00
Nicholas Nethercote
9695958ebc Remove position: absolute from text divs.
It's not necessary in each text div, because it's specified in the
`.textLayer > div` rule.
2014-08-15 08:17:20 -07:00
Nicholas Nethercote
be29fc44e0 Avoid repeated creation of a simple RegExp object. 2014-08-07 22:08:23 -07:00
Yury Delendik
e8af56ffc5 Fixes text-selection example 2014-08-06 10:09:27 -05:00
Yury Delendik
666cf02f91 Merge pull request #5137 from CodingFabian/optimize-textbuilder-renderLayer
Optimize TextLayerBuilder_renderLayer() for text heavy documents.
2014-08-06 09:09:32 -05:00
Fabian Lange
39129fc441 Optimize TextLayerBuilder_renderLayer() for text heavy documents.
This change improves the text layer creation of "normal" text heavy documents.
It changes 2 things:
 * If the text element is not rotated, it will neither calculate nor apply a
   textTransform: rotate(0deg) to the text layer element.
 * For scaling the text layer div, the context will measure the width of the
   text in the given font. For many text documents the font changes seldom.
   If the font stays the same, the context does not need to be set to a new font
   especially avoiding the temporary creation of the same font string over and
   over again.
2014-08-06 00:40:48 +02:00
Tim van der Meij
dbe22475e1 Converting PDFFindBar and PDFFindController to classes 2014-07-29 21:59:01 +02:00
Tim van der Meij
fa33b9c643 Refactoring PDFFindController in the text layer builder 2014-06-23 22:19:18 +02:00
Tim van der Meij
a968da8887 Convert the text layer builder to a class 2014-06-23 22:07:21 +02:00
Tim van der Meij
2a052c4aad Refactoring text layer builder 2014-06-23 21:40:37 +02:00
Rob Wu
d7dfa447cd Remove unused (local) variables in web/ 2014-04-15 17:10:23 +02:00
Manuel Braun
e7da8edb91 Refactoring - remove duplicated code in TextLayerBuilder 2014-04-14 19:05:21 +02:00
Yury Delendik
f6c631bc31 Reverts #4556 due to flicker on Chome 2014-04-11 14:07:36 -05:00
Yury Delendik
c88696cf5f Merge pull request #4595 from brendandahl/search-regression
Append whitespace divs so matches still line up.
2014-04-11 11:48:57 -05:00
Brendan Dahl
5ba674c996 Append whitespace divs so matches still line up. 2014-04-10 14:01:21 -07:00
p01
b10aa18b3e Use Opaque Canvas where possible 2014-04-10 11:50:20 +02:00
Brendan Dahl
5bd8a83c9b Build the text layer geometry on the worker. 2014-04-09 16:44:07 -07:00
Jonas Jenwald
5dcc92430c Fix coding style in web/text_layer_builder.js 2014-03-10 11:48:20 +01:00
Nicholas Nethercote
d4e8b41639 Remove some unnecessary local variables. 2014-02-24 18:25:59 -08:00
Yury Delendik
96fff4cc74 Refactors getTextContent return value 2014-01-17 13:26:00 -06:00
Yury Delendik
0131101275 Takes ascent/descent in account in the text layer 2014-01-08 13:50:52 -06:00
Jonas Jenwald
736c570231 Add support for horizontal scrolling in 'scrollIntoView' in ui_utils.js 2013-12-03 19:55:35 +01:00
Brendan Dahl
9ac950f9a8 Append entire DOM fragment at once. 2013-11-26 11:01:28 -08:00
Srishti
3808d02a53 implementing transform matrix to getTextContent 2013-09-20 06:37:08 +05:30
Jonas
b118ade9ae Fix searching in presentation mode in Firefox 2013-09-06 09:08:43 +02:00
Srishti
6c3e5e5d92 Fixing the offset of vertical CJK text 2013-07-20 20:56:33 +05:30
Srishti
21a8d62624 Fixes Text rotation issue #2095 2013-06-30 03:52:30 +05:30
Vivin Paliath
83b6eaed16 pr #3356
squashing commits.
2013-06-18 09:05:55 -07:00