Base gutter updates on defaultCharWidth instead of fontSize/Family

This commit is contained in:
Nathan Sobo
2014-06-02 12:38:26 +09:00
parent f467e3eed4
commit 8f98f2368b
2 changed files with 3 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ EditorComponent = React.createClass
div className: className, style: {fontSize, lineHeight, fontFamily}, tabIndex: -1,
GutterComponent {
ref: 'gutter', editor, renderedRowRange, maxLineNumberDigits,
scrollTop, scrollHeight, lineHeight, lineHeightInPixels, fontSize, fontFamily,
scrollTop, scrollHeight, lineHeight, lineHeightInPixels, defaultCharWidth,
@pendingChanges, onWidthChanged: @onGutterWidthChanged, mouseWheelScreenRow
}

View File

@@ -34,7 +34,7 @@ GutterComponent = React.createClass
# visible row range.
shouldComponentUpdate: (newProps) ->
return true unless isEqualForProperties(newProps, @props,
'renderedRowRange', 'scrollTop', 'lineHeightInPixels', 'fontSize',
'renderedRowRange', 'scrollTop', 'lineHeightInPixels', 'defaultCharWidth',
'mouseWheelScreenRow'
)
@@ -49,7 +49,7 @@ GutterComponent = React.createClass
@updateDummyLineNumber()
@removeLineNumberNodes()
@measureWidth() unless @lastMeasuredWidth? and isEqualForProperties(oldProps, @props, 'maxLineNumberDigits', 'fontSize', 'fontFamily')
@measureWidth() unless @lastMeasuredWidth? and isEqualForProperties(oldProps, @props, 'maxLineNumberDigits', 'defaultCharWidth')
@clearScreenRowCaches() unless oldProps.lineHeightInPixels is @props.lineHeightInPixels
@updateLineNumbers()