mirror of
https://github.com/atom/atom.git
synced 2026-02-15 17:15:24 -05:00
Add Pane::onDidMoveItem()
This commit is contained in:
@@ -100,6 +100,9 @@ class Pane extends Model
|
||||
onDidRemoveItem: (fn) ->
|
||||
@emitter.on 'did-remove-item', fn
|
||||
|
||||
onDidMoveItem: (fn) ->
|
||||
@emitter.on 'did-move-item', fn
|
||||
|
||||
onDidChangeActiveItem: (fn) ->
|
||||
@emitter.on 'did-change-active-item', fn
|
||||
|
||||
@@ -230,6 +233,7 @@ class Pane extends Model
|
||||
@items.splice(oldIndex, 1)
|
||||
@items.splice(newIndex, 0, item)
|
||||
@emit 'item-moved', item, newIndex
|
||||
@emitter.emit 'did-move-item', {item, oldIndex, newIndex}
|
||||
|
||||
# Public: Moves the given item to the given index at another pane.
|
||||
moveItemToPane: (item, pane, index) ->
|
||||
|
||||
Reference in New Issue
Block a user