mirror of
https://github.com/atom/atom.git
synced 2026-02-14 16:45:14 -05:00
Pane emits 'pane:item-removed' events
This commit is contained in:
committed by
probablycorey
parent
dd120663b7
commit
5240d9989f
@@ -94,10 +94,14 @@ class Pane extends View
|
||||
false
|
||||
|
||||
removeItem: (item) ->
|
||||
index = @items.indexOf(item)
|
||||
return if index == -1
|
||||
|
||||
@showNextItem() if item is @activeItem and @items.length > 1
|
||||
_.remove(@items, item)
|
||||
item.destroy?()
|
||||
@cleanupItemView(item)
|
||||
@trigger 'pane:item-removed', [item, index]
|
||||
@remove() unless @items.length
|
||||
|
||||
itemForPath: (path) ->
|
||||
|
||||
Reference in New Issue
Block a user