Fire event before a pane is destroyed.

This commit is contained in:
George Ogata
2015-07-23 18:46:48 -04:00
parent c12cb2caf4
commit 45694dcda0
5 changed files with 54 additions and 0 deletions

View File

@@ -251,6 +251,16 @@ class Workspace extends Model
# Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.
onDidAddPane: (callback) -> @paneContainer.onDidAddPane(callback)
# Extended: Invoke the given callback before a pane is destroyed in the
# workspace.
#
# * `callback` {Function} to be called before panes are destroyed.
# * `event` {Object} with the following keys:
# * `pane` The pane to be destroyed.
#
# Returns a {Disposable} on which `.dispose()` can be called to unsubscribe.
onWillDestroyPane: (callback) -> @paneContainer.onWillDestroyPane(callback)
# Extended: Invoke the given callback when a pane is destroyed in the
# workspace.
#