Use presenter to supply scrollHeight to lines component

This commit is contained in:
Nathan Sobo
2015-01-21 16:56:31 -07:00
parent 2c5888e25a
commit 78d87d8f7c

View File

@@ -20,12 +20,12 @@ LinesComponent = React.createClass
{performedInitialMeasurement, cursorBlinkPeriod, cursorBlinkResumeDelay} = @props
if performedInitialMeasurement
{editor, presenter, overlayDecorations, highlightDecorations, scrollHeight, placeholderText, backgroundColor} = @props
{editor, presenter, overlayDecorations, highlightDecorations, placeholderText, backgroundColor} = @props
@newState = presenter.state.content
@oldState ?= {lines: {}}
{scrollWidth} = @newState
{scrollWidth, scrollHeight} = @newState
{lineHeightInPixels, defaultCharWidth, scrollViewHeight, scopedCharacterWidthsChangeCount} = @props
{scrollTop, scrollLeft, cursorPixelRects} = @props
style =