Update cursors component if the defaultCharWidth changes

This commit is contained in:
Nathan Sobo
2014-06-02 12:41:22 +09:00
parent 8f98f2368b
commit 77f78d0a11
2 changed files with 2 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ CursorsComponent = React.createClass
shouldComponentUpdate: (newProps, newState) ->
not newState.blinkOff is @state.blinkOff or
not isEqualForProperties(newProps, @props, 'cursorScreenRanges', 'scrollTop', 'scrollLeft', 'lineHeightInPixels')
not isEqualForProperties(newProps, @props, 'cursorScreenRanges', 'scrollTop', 'scrollLeft', 'lineHeightInPixels', 'defaultCharWidth')
componentWillUpdate: (newProps) ->
@pauseCursorBlinking() if @props.cursorScreenRanges and not isEqual(newProps.cursorScreenRanges, @props.cursorScreenRanges)

View File

@@ -85,7 +85,7 @@ EditorComponent = React.createClass
CursorsComponent {
editor, scrollTop, scrollLeft, cursorScreenRanges, cursorBlinkPeriod, cursorBlinkResumeDelay,
fontSize, fontFamily, lineHeightInPixels
lineHeightInPixels, defaultCharWidth
}
LinesComponent {
ref: 'lines', editor, lineHeightInPixels, defaultCharWidth,