Construct LinesComponent with visibility param to avoid redundant update

This commit is contained in:
Nathan Sobo
2015-02-11 16:14:41 -07:00
parent 0047e3bc2d
commit ea49fc6d5f
2 changed files with 3 additions and 4 deletions

View File

@@ -116,11 +116,10 @@ TextEditorComponent = React.createClass
@mountGutterComponent() if @gutterVisible
@linesComponent = new LinesComponent({@presenter, hostElement, useShadowDOM})
scrollViewNode = @refs.scrollView.getDOMNode()
horizontalScrollbarNode = @refs.horizontalScrollbar.getDOMNode()
@linesComponent = new LinesComponent({@presenter, hostElement, useShadowDOM, visible: @isVisible()})
scrollViewNode.insertBefore(@linesComponent.domNode, horizontalScrollbarNode)
@linesComponent.updateSync(@isVisible())
@observeEditor()
@listenForDOMEvents()