Retrieve backgroundColor from the correct object

Thanks, @nathansobo! 
This commit is contained in:
Antonio Scandurra
2015-06-30 14:46:29 +02:00
parent 8cd9128bec
commit 6735357dd1

View File

@@ -20,7 +20,7 @@ class LineNumbersTileComponent
updateSync: (state) ->
@newState = state
unless @oldState
@oldState = {tiles: {}}
@oldState = {tiles: {}, styles: {}}
@oldState.tiles[@id] = {lineNumbers: {}}
@newTileState = @newState.tiles[@id]
@@ -30,9 +30,9 @@ class LineNumbersTileComponent
@domNode.style.display = @newTileState.display
@oldTileState.display = @newTileState.display
if @newState.backgroundColor isnt @oldState.backgroundColor
@domNode.style.backgroundColor = @newState.backgroundColor
@oldState.backgroundColor = @newState.backgroundColor
if @newState.styles.backgroundColor isnt @oldState.styles.backgroundColor
@domNode.style.backgroundColor = @newState.styles.backgroundColor
@oldState.styles.backgroundColor = @newState.styles.backgroundColor
if @newTileState.height isnt @oldTileState.height
@domNode.style.height = @newTileState.height + 'px'