Add several scroll shims to ReactEditorView

This commit is contained in:
Corey Johnson
2014-06-09 15:37:02 -07:00
parent a2c4caf7ad
commit 7379627fcb

View File

@@ -65,12 +65,22 @@ class ReactEditorView extends View
else
@editor.getScrollLeft()
scrollToBottom: ->
@editor.setScrollBottom(Infinity)
scrollToScreenPosition: (screenPosition) ->
@editor.scrollToScreenPosition(screenPosition)
scrollToBufferPosition: (bufferPosition) ->
@editor.scrollToBufferPosition(bufferPosition)
scrollToCursorPosition: ->
@editor.scrollToCursorPosition()
scrollToPixelPosition: (pixelPosition) ->
screenPosition = screenPositionForPixelPosition(pixelPosition)
@editor.scrollToScreenPosition(screenPosition)
pixelPositionForBufferPosition: (bufferPosition) ->
@editor.pixelPositionForBufferPosition(bufferPosition)