Make selection updating work properly

This commit is contained in:
Ben Ogle
2014-06-16 13:54:53 -07:00
parent 351dc58354
commit 4f2f158d0d
5 changed files with 19 additions and 8 deletions

View File

@@ -35,15 +35,13 @@ GutterComponent = React.createClass
# visible row range.
shouldComponentUpdate: (newProps) ->
return true unless isEqualForProperties(newProps, @props,
'renderedRowRange', 'scrollTop', 'lineHeightInPixels', 'mouseWheelScreenRow'#, 'decorations'
'renderedRowRange', 'scrollTop', 'lineHeightInPixels', 'mouseWheelScreenRow', 'decorations'
)
{renderedRowRange, pendingChanges, decorations} = newProps
for change in pendingChanges when Math.abs(change.screenDelta) > 0 or Math.abs(change.bufferDelta) > 0
return true unless change.end <= renderedRowRange.start or renderedRowRange.end <= change.start
return true unless _.isEqual(@previousDecorations, decorations)
false
componentDidUpdate: (oldProps) ->