render current page immediately

This commit is contained in:
Brian 2015-01-20 21:33:49 +00:00
parent 62d5916883
commit f510c5d19f
2 changed files with 11 additions and 1 deletions

View file

@ -55,7 +55,8 @@ define [
if scope.page.current
# console.log 'we must scroll to this page', scope.page.pageNum, 'at position', scope.page.position
# this is the current page, we want to scroll it into view
# FIXME: do we need to ensure render fires before moving to this position???
# and render it immediately
scope.document.renderPage scope.page
ctrl.setPdfPosition(scope.page, scope.page.position)
element.on 'dblclick', (e) ->

View file

@ -110,6 +110,15 @@ define [
}
@triggerRenderQueue()
renderPage: (page) ->
return if @shuttingDown
current = {
'element': page.elementChildren
'pagenum': page.pageNum
}
@renderQueue.push current
@processRenderQueue()
processRenderQueue: () ->
return if @shuttingDown
return if @jobs > 0