mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
prevent exception when scrolling during rerender in pdfng
This commit is contained in:
parent
206e7db144
commit
863c8b9586
1 changed files with 5 additions and 2 deletions
|
@ -137,7 +137,8 @@ define [
|
||||||
if visible
|
if visible
|
||||||
# console.log 'found it', topPageIdx
|
# console.log 'found it', topPageIdx
|
||||||
else
|
else
|
||||||
console.log 'CANNOT FIND TOP PAGE'
|
# console.log 'CANNOT FIND TOP PAGE'
|
||||||
|
return
|
||||||
|
|
||||||
# console.log 'top page is', topPage.pageNum, topPage.elemTop, topPage.elemBottom, topPage
|
# console.log 'top page is', topPage.pageNum, topPage.elemTop, topPage.elemBottom, topPage
|
||||||
top = topPage.elemTop
|
top = topPage.elemTop
|
||||||
|
@ -296,7 +297,9 @@ define [
|
||||||
scope.scrollHandlerTimeout = null
|
scope.scrollHandlerTimeout = null
|
||||||
updateContainer()
|
updateContainer()
|
||||||
scope.$apply()
|
scope.$apply()
|
||||||
scope.position = ctrl.getPdfPosition()
|
newPosition = ctrl.getPdfPosition()
|
||||||
|
if newPosition?
|
||||||
|
scope.position = newPosition
|
||||||
scope.$apply()
|
scope.$apply()
|
||||||
|
|
||||||
scope.$watch 'pdfSrc', (newVal, oldVal) ->
|
scope.$watch 'pdfSrc', (newVal, oldVal) ->
|
||||||
|
|
Loading…
Reference in a new issue