Only clear screen row caches on lines component if lineHeight changes

This commit is contained in:
Nathan Sobo
2014-05-16 14:52:12 -06:00
parent b000e8e4a2
commit fe82e3e30f

View File

@@ -44,10 +44,8 @@ LinesComponent = React.createClass
false
componentDidUpdate: (prevProps) ->
unless isEqualForProperties(prevProps, @props, 'fontSize', 'fontFamily', 'lineHeight')
@clearScreenRowCaches()
@measureLineHeightAndCharWidth()
@measureLineHeightAndCharWidth() unless isEqualForProperties(prevProps, @props, 'fontSize', 'fontFamily', 'lineHeight')
@clearScreenRowCaches() unless prevProps.lineHeight is @props.lineHeight
@updateLines()
@clearScopedCharWidths() unless isEqualForProperties(prevProps, @props, 'fontSize', 'fontFamily')
@measureCharactersInNewLines() unless @props.scrollingVertically