Don't render an opaque background behind line numbers

It doesn't help subpixel anti-aliasing like I thought, so screw it.
This commit is contained in:
Nathan Sobo
2014-06-20 16:07:19 -06:00
parent 4218e0a037
commit d839ea9aa5
3 changed files with 5 additions and 15 deletions

View File

@@ -15,13 +15,10 @@ GutterComponent = React.createClass
measuredWidth: null
render: ->
{scrollHeight, scrollViewHeight, scrollTop, onMouseDown} = @props
{scrollTop, onMouseDown} = @props
div className: 'gutter', onClick: @onClick, onMouseDown: onMouseDown,
# The line-numbers div must have the 'editor-colors' class so it has an
# opaque background to avoid sub-pixel anti-aliasing problems on the GPU
div className: 'gutter line-numbers editor-colors', ref: 'lineNumbers', style:
height: Math.max(scrollHeight, scrollViewHeight)
div className: 'line-numbers', ref: 'lineNumbers', style:
WebkitTransform: "translate3d(0px, #{-scrollTop}px, 0px)"
componentWillMount: ->
@@ -38,8 +35,7 @@ GutterComponent = React.createClass
# visible row range.
shouldComponentUpdate: (newProps) ->
return true unless isEqualForProperties(newProps, @props,
'renderedRowRange', 'scrollTop', 'lineHeightInPixels', 'mouseWheelScreenRow', 'lineDecorations',
'scrollViewHeight'
'renderedRowRange', 'scrollTop', 'lineHeightInPixels', 'mouseWheelScreenRow', 'lineDecorations'
)
{renderedRowRange, pendingChanges, lineDecorations} = newProps