mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
replace canvas with rendered page after 1 second
This commit is contained in:
parent
0e550ac012
commit
b8f677ac7c
1 changed files with 7 additions and 1 deletions
|
@ -224,7 +224,10 @@ define [
|
|||
navigateFn: @navigateFn
|
||||
})
|
||||
|
||||
renderTimer = setTimeout () ->
|
||||
renderTimer = null
|
||||
element.canvas.replaceWith(canvas)
|
||||
, 1000
|
||||
|
||||
# console.log 'staring page render', pagenum
|
||||
|
||||
|
@ -245,6 +248,9 @@ define [
|
|||
|
||||
result.then () ->
|
||||
# console.log 'page rendered', pagenum
|
||||
if renderTimer?
|
||||
element.canvas.replaceWith(canvas)
|
||||
clearTimeout renderTimer
|
||||
$timeout.cancel(timer)
|
||||
canvas.removeClass('pdfng-rendering')
|
||||
page.getTextContent().then (textContent) ->
|
||||
|
|
Loading…
Reference in a new issue