Move selection background region calculation into React component

This commit is contained in:
Nathan Sobo
2014-05-13 10:59:38 -06:00
parent 0162247bd7
commit 9b02055db9
3 changed files with 13 additions and 18 deletions

View File

@@ -591,17 +591,6 @@ class Selection extends Model
compare: (otherSelection) ->
@getBufferRange().compare(otherSelection.getBufferRange())
getBackgroundRect: ->
{start, end} = @getScreenRange()
return if start.row is end.row
lineHeight = @editor.getLineHeight()
height = (end.row - start.row) * lineHeight
top = start.row * lineHeight
left = 0
right = 0
{top, left, right, height}
screenRangeChanged: ->
screenRange = @getScreenRange()
@emit 'screen-range-changed', screenRange