Highlight selection w/ animation when autoscroll is true

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-11-30 12:44:12 -07:00
parent be2b9ee100
commit c7363b3347
3 changed files with 46 additions and 2 deletions

View File

@@ -71,6 +71,16 @@ class SelectionView extends View
autoscrolled: ->
@selection.autoscrolled()
@highlight()
highlight: ->
@unhighlight()
@addClass('highlighted')
clearTimeout(@unhighlightTimeout)
@unhighlightTimeout = setTimeout((=> @unhighlight()), 1000)
unhighlight: ->
@removeClass('highlighted')
remove: ->
@editor.removeSelectionView(this)