[Gutter][View Registry] Make the Presenter pass sorted Gutter models instead of sorted derived state

This commit is contained in:
Jess Lin
2015-03-31 13:38:35 -07:00
parent d2914bc73c
commit f3d2597bda
4 changed files with 11 additions and 14 deletions

View File

@@ -70,7 +70,7 @@ class TextEditorComponent
@scrollViewNode.classList.add('scroll-view')
@domNode.appendChild(@scrollViewNode)
@mountGutterContainerComponent() if @presenter.getState().gutters.sortedDescriptions.length
@mountGutterContainerComponent() if @presenter.getState().gutters.sortedModels.length
@hiddenInputComponent = new InputComponent
@scrollViewNode.appendChild(@hiddenInputComponent.domNode)
@@ -134,7 +134,7 @@ class TextEditorComponent
else
@domNode.style.height = ''
if @newState.gutters.sortedDescriptions.length
if @newState.gutters.sortedModels.length
@mountGutterContainerComponent() unless @gutterContainerComponent?
@gutterContainerComponent.updateSync(@newState)
else