mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Init review panel with ace editor height
This commit is contained in:
parent
77c02042f8
commit
42ab2e8165
2 changed files with 7 additions and 3 deletions
|
@ -234,8 +234,6 @@ define [
|
|||
|
||||
doc = session.getDocument()
|
||||
doc.on "change", onChange
|
||||
|
||||
session.on "changeScrollTop", onScroll
|
||||
|
||||
sharejs_doc.on "remoteop.recordForUndo", () =>
|
||||
undoManager.nextUpdateIsRemote = true
|
||||
|
@ -243,9 +241,15 @@ define [
|
|||
editor.initing = true
|
||||
sharejs_doc.attachToAce(editor)
|
||||
editor.initing = false
|
||||
|
||||
# need to set annotations after attaching because attaching
|
||||
# deletes and then inserts document content
|
||||
session.setAnnotations scope.annotations
|
||||
|
||||
session.on "changeScrollTop", onScroll
|
||||
setTimeout () ->
|
||||
# Let any listeners init themselves
|
||||
onScroll(editor.renderer.getScrollTop())
|
||||
|
||||
editor.focus()
|
||||
|
||||
|
|
|
@ -45,4 +45,4 @@ define [
|
|||
deltaY = e.wheelY
|
||||
# console.log "mousewheel", deltaY
|
||||
scroller.scrollTop(scroller.scrollTop() + deltaY * 4)
|
||||
e.preventDefault()
|
||||
e.preventDefault()
|
||||
|
|
Loading…
Reference in a new issue