mirror of
https://github.com/atom/atom.git
synced 2026-02-17 18:11:29 -05:00
Emit a pane-item-destroyed event from the workspace model
…Instead of calling itemDestroyed on the workspace view via a DOM query
This commit is contained in:
@@ -11,6 +11,10 @@ class Workspace extends Model
|
||||
paneContainer: -> new PaneContainer
|
||||
fullScreen: false
|
||||
|
||||
constructor: ->
|
||||
super
|
||||
@subscribe @paneContainer, 'item-destroyed', @onPaneItemDestroyed
|
||||
|
||||
deserializeParams: (params) ->
|
||||
params.paneContainer = PaneContainer.deserialize(params.paneContainer)
|
||||
params
|
||||
@@ -18,3 +22,6 @@ class Workspace extends Model
|
||||
serializeParams: ->
|
||||
paneContainer: @paneContainer.serialize()
|
||||
fullScreen: atom.isFullScreen()
|
||||
|
||||
onPaneItemDestroyed: (item) =>
|
||||
@emit 'pane-item-destroyed', item
|
||||
|
||||
Reference in New Issue
Block a user