mirror of
https://github.com/atom/atom.git
synced 2026-02-17 18:11:29 -05:00
Add pane-container:active-item-changed event
This commit is contained in:
@@ -113,7 +113,7 @@ class Pane extends View
|
||||
|
||||
# Public: Returns whether this pane is currently focused.
|
||||
isActive: ->
|
||||
@hasClass('active')
|
||||
@getContainer()?.getActivePane() == this
|
||||
|
||||
# Public: Returns the next pane, ordered by creation.
|
||||
getNextPane: ->
|
||||
@@ -175,6 +175,7 @@ class Pane extends View
|
||||
view.focus() if isFocused
|
||||
@activeItem = item
|
||||
@activeView = view
|
||||
@getContainer()?.triggerActiveItemChange(item) if @isActive()
|
||||
@trigger 'pane:active-item-changed', [item]
|
||||
|
||||
@state.set('activeItemUri', item.getUri?())
|
||||
@@ -425,6 +426,7 @@ class Pane extends View
|
||||
when 'after' then parent.insertChildAfter(this, newPane)
|
||||
@getContainer().adjustPaneDimensions()
|
||||
newPane.focus()
|
||||
@getContainer().triggerActiveItemChange(newPane.getActivePaneItem())
|
||||
newPane
|
||||
|
||||
# Private:
|
||||
|
||||
Reference in New Issue
Block a user