mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
render current page immediately
This commit is contained in:
parent
62d5916883
commit
f510c5d19f
2 changed files with 11 additions and 1 deletions
|
@ -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) ->
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue