Nate Stemen
ebea8a8633
use regex test instead of match when only bool needed
2018-08-27 14:25:01 -04:00
Alasdair Smith
285c9587e9
Use injected Cmaps path
2017-08-25 15:48:13 +01:00
Paulo Reis
af2cbf5a51
Force return true on a jquery handler; returning falsy values may have unexpected results.
2017-06-15 16:17:21 +01:00
Paulo Reis
fcf0a96933
Use selection.isCollapsed to check for empty selections.
2017-06-15 16:16:30 +01:00
Brian Gough
503822deb0
avoid possible exception if selection is undefined
...
defensive programming only
2017-06-15 14:32:00 +01:00
Brian Gough
b9804823f3
handle off-screen selection
...
when toggling the logs button the selection is off-screen and
selection.toString() is empty even when there is a selected range. Can
check for selection.type being "Range" instead.
2017-06-15 14:21:42 +01:00
Brian Gough
b04288ed44
avoid getting duplicate handlers for mouseup
2017-06-15 14:21:42 +01:00
Brian Gough
76dcde4dae
hide the text layer on reload
2017-06-15 13:42:19 +01:00
Paulo Reis
fbaa918927
Do not show the text layer when the user clicks outside pages. Remove some debug statements.
2017-06-15 12:32:04 +01:00
Paulo Reis
4985f7ca1c
Different approach: render all text layers while selecting (WIP).
2017-06-15 12:32:04 +01:00
Paulo Reis
786659dc1b
Render text layer on hovered pages (and adjacent ones).
2017-06-15 12:32:04 +01:00
Brian Gough
aa8974dcd6
Revert "use a single pdfjs worker, rotated to avoid leaks"
...
This reverts commit f270ef54911acd800d2ffd577080b50ea2fe4aff.
Use a new worker on each reload to free up memory.
2017-06-07 13:29:10 +01:00
Brian Gough
84f986058a
enable pdfjs cmaps in pdfRenderer
2016-10-20 12:55:58 +01:00
Brian Gough
29080bafb2
use PDFJS text layer renderer instead of our own
2016-10-14 12:00:47 +01:00
Brian Gough
c98f40b90b
use a single pdfjs worker, rotated to avoid leaks
2016-10-13 16:10:02 +01:00
Brian Gough
85d8c2ed2e
pass in PDFJS as a module, not global
2016-10-13 16:10:01 +01:00
Brian Gough
71275efebe
remove unused pdf dependency
2016-10-13 16:10:01 +01:00
Brian Gough
27a8dc1dfd
upgrade pdfjs to 1.6.210p1
2016-10-13 16:10:01 +01:00
Brian Gough
f31e3260ee
remove pdfjs special case disableFontFace for MSIE
2016-10-13 16:10:01 +01:00
Brian Gough
4ca918a3b8
render canvas on-screen to avoid bad fonts in MSIE
2016-10-13 14:40:57 +01:00
James Allen
1e1c4ec570
Disable font face in PDFs for IE 11 as well
2016-09-30 15:12:27 +01:00
Brian Gough
de2e0478c6
disable pdfjs fontface on Microsoft Edge
2016-09-21 13:58:14 +01:00
Henry Oswald
6c78ab4ace
got requirejs working nicely with cdn
2016-07-20 12:58:32 +01:00
Brian Gough
d53fa5de47
avoid exception in pdf viewer when no visible pages
2016-07-13 14:14:51 +01:00
Brian Gough
d8c11a0824
fix scope for pdf page load error handler
2016-07-13 14:04:58 +01:00
Brian Gough
8c9fcfdd60
remove sentry downsampling on pdf errors
...
load errors should be less frequent now
2016-07-12 11:51:30 +01:00
Brian Gough
7555382e33
remove the render timeout
...
pdfjs uses requestAnimationFrame to schedule the rendering, and this
does not fire if the tab is inactive. That causes an unwanted error if
switching tabs for more than the one minute timeout.
2016-07-12 11:51:30 +01:00
Brian Gough
0ae639f1c3
enable per-page pdf downloads by default
2016-07-12 11:51:30 +01:00
Brian Gough
b546c5eee9
cleanup, remove comments
2016-07-11 15:07:06 +01:00
Brian Gough
4b1ec24bc0
cancel existing load/render tasks correctly
2016-07-11 15:01:58 +01:00
Brian Gough
f68ab1e508
improve loading indicators
2016-07-11 15:01:24 +01:00
Brian Gough
379e6d2f90
nullify highlight timeout after clearing it
2016-07-11 12:17:49 +01:00
Brian Gough
ad83784a81
remove the renderTimer
...
only display the page when it is fully rendered
2016-07-11 12:17:49 +01:00
Brian Gough
70a82c10ce
cleanup pdfJs
2016-07-11 12:17:49 +01:00
Brian Gough
41b0309e6e
show progress bar when loading starts
2016-07-11 12:17:49 +01:00
Brian Gough
a4cd5c90c3
only process the render queue after we stop moving
2016-07-11 12:17:49 +01:00
Brian Gough
eaca616dd3
use progress bar for initial loading
2016-07-11 12:17:49 +01:00
Brian Gough
b8f677ac7c
replace canvas with rendered page after 1 second
2016-07-11 12:17:49 +01:00
Brian Gough
0e550ac012
add spinner for loading, initially static
2016-07-11 12:17:49 +01:00
Brian Gough
c657a02db5
render offscreen pages
2016-07-11 12:17:49 +01:00
Brian Gough
83ea771aef
include start method for spinner
2016-07-11 12:17:49 +01:00
Brian Gough
8c81f0a9ff
prerender offscreen pages
2016-07-11 12:17:49 +01:00
Brian Gough
16b58a9420
Merge pull request #268 from sharelatex/per-user-containers-part-3
...
add support for on-demand viewing of pdfs for per-user compiles
2016-06-29 14:16:24 +01:00
Brian Gough
991d3c7aa1
avoid exception when switching between full and split pdf view
2016-06-14 12:49:06 +01:00
Brian Gough
2840a7757f
fix bug in synctex position calculation for syncToCode
2016-06-14 12:32:54 +01:00
Brian Gough
3c31988e9a
enable on-demand viewing of pdfs for per-user compiles
2016-06-10 16:06:02 +01:00
James Allen
a196531a58
Move spinner add logic into same code pathway as spinner remove logic
2016-05-24 15:13:08 +01:00
Brian Gough
ab0bcd4f57
increase default pdfjs chunk size from 64K to 128K
2016-05-10 15:53:37 +01:00
James Allen
8a095a5144
Upgrade to PDF 1.3.91
2016-02-04 14:27:00 +00:00
Brian Gough
1bb7ae3996
always remove the spinner, even if it is not spinning
2015-05-11 14:12:24 +01:00