mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Move new character measurement to end of full update to avoid reflow
This commit is contained in:
@@ -101,7 +101,7 @@ TextEditorComponent = React.createClass
|
||||
@hiddenInputComponent = new InputComponent(@presenter)
|
||||
scrollViewNode.appendChild(@hiddenInputComponent.domNode)
|
||||
|
||||
@linesComponent = new LinesComponent({@presenter, hostElement, useShadowDOM, visible: @isVisible()})
|
||||
@linesComponent = new LinesComponent({@presenter, hostElement, useShadowDOM})
|
||||
scrollViewNode.appendChild(@linesComponent.domNode)
|
||||
|
||||
@horizontalScrollbarComponent = new ScrollbarComponent({@presenter, orientation: 'horizontal', onScroll: @onHorizontalScroll})
|
||||
@@ -153,7 +153,7 @@ TextEditorComponent = React.createClass
|
||||
@gutterComponent = null
|
||||
|
||||
@hiddenInputComponent.updateSync()
|
||||
@linesComponent.updateSync(@isVisible())
|
||||
@linesComponent.updateSync()
|
||||
@horizontalScrollbarComponent.updateSync()
|
||||
@verticalScrollbarComponent.updateSync()
|
||||
@scrollbarCornerComponent.updateSync()
|
||||
@@ -165,6 +165,8 @@ TextEditorComponent = React.createClass
|
||||
@props.hostElement.__spacePenView.trigger 'selection:changed' if selectionChanged
|
||||
@props.hostElement.__spacePenView.trigger 'editor:display-updated'
|
||||
|
||||
@linesComponent.measureCharactersInNewLines() if @isVisible() and not @newState.content.scrollingVertically
|
||||
|
||||
mountGutterComponent: ->
|
||||
{editor} = @props
|
||||
@gutterComponent = new GutterComponent({@presenter, editor, onMouseDown: @onGutterMouseDown})
|
||||
|
||||
Reference in New Issue
Block a user