mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 21:59:00 +02:00
render current page immediately
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user