From 33ad0a9b931fbdb0844bc5cb0920f57e11423ebe Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 16 Sep 2014 09:19:07 -0600 Subject: [PATCH] Delegate ::onDidChangeActivePane and ::observeActivePane --- src/workspace.coffee | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/workspace.coffee b/src/workspace.coffee index 3862b91e0..64ea6404b 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -110,6 +110,24 @@ class Workspace extends Model # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. observePanes: (callback) -> @paneContainer.observePanes(callback) + # Extended: Invoke the given callback when the active pane changes. + # + # * `callback` {Function} to be called when the active pane changes. + # * `pane` A {Pane} that is the current return value of {::getActivePane}. + # + # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. + onDidChangeActivePane: (callback) -> @paneContainer.onDidChangeActivePane(callback) + + # Extended: Invoke the given callback with the current active pane and when + # the active pane changes. + # + # * `callback` {Function} to be called with the current and future active# + # panes. + # * `pane` A {Pane} that is the current return value of {::getActivePane}. + # + # Returns a {Disposable} on which `.dispose()` can be called to unsubscribe. + observeActivePane: (callback) -> @paneContainer.observeActivePane(callback) + # Extended: Invoke the given callback when a pane item is added to the # workspace. #