💄 per nathan’s request

This commit is contained in:
Ben Ogle
2014-06-16 16:06:18 -07:00
parent 7ba498a170
commit 5b84aa7b18

View File

@@ -6,13 +6,15 @@ HighlightComponent = React.createClass
displayName: 'HighlightComponent'
render: ->
{editor, decoration, lineHeightInPixels} = @props
{editor, decoration} = @props
{start, end} = decoration.screenRange
rowCount = end.row - start.row + 1
startPixelPosition = editor.pixelPositionForScreenPosition(start)
endPixelPosition = editor.pixelPositionForScreenPosition(end)
div className: "highlight #{decoration.class or ''}",
className = 'highlight'
className += " #{decoration.class}" if decoration.class?
div {className},
if rowCount is 1
@renderSingleLineRegions(startPixelPosition, endPixelPosition)
else