mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-11 18:50:56 +00: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
|
navigateFn: @navigateFn
|
||||||
})
|
})
|
||||||
|
|
||||||
element.canvas.replaceWith(canvas)
|
renderTimer = setTimeout () ->
|
||||||
|
renderTimer = null
|
||||||
|
element.canvas.replaceWith(canvas)
|
||||||
|
, 1000
|
||||||
|
|
||||||
# console.log 'staring page render', pagenum
|
# console.log 'staring page render', pagenum
|
||||||
|
|
||||||
|
@ -245,6 +248,9 @@ define [
|
||||||
|
|
||||||
result.then () ->
|
result.then () ->
|
||||||
# console.log 'page rendered', pagenum
|
# console.log 'page rendered', pagenum
|
||||||
|
if renderTimer?
|
||||||
|
element.canvas.replaceWith(canvas)
|
||||||
|
clearTimeout renderTimer
|
||||||
$timeout.cancel(timer)
|
$timeout.cancel(timer)
|
||||||
canvas.removeClass('pdfng-rendering')
|
canvas.removeClass('pdfng-rendering')
|
||||||
page.getTextContent().then (textContent) ->
|
page.getTextContent().then (textContent) ->
|
||||||
|
|
Loading…
Reference in a new issue