replace canvas with rendered page after 1 second

This commit is contained in:
Brian Gough 2016-07-01 16:34:28 +01:00
parent 0e550ac012
commit b8f677ac7c

View file

@ -224,7 +224,10 @@ define [
navigateFn: @navigateFn
})
element.canvas.replaceWith(canvas)
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) ->