Init review panel with ace editor height

This commit is contained in:
James Allen 2016-10-13 12:21:49 +01:00
parent 77c02042f8
commit 42ab2e8165
2 changed files with 7 additions and 3 deletions

View file

@ -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()

View file

@ -45,4 +45,4 @@ define [
deltaY = e.wheelY
# console.log "mousewheel", deltaY
scroller.scrollTop(scroller.scrollTop() + deltaY * 4)
e.preventDefault()
e.preventDefault()