mirror of
https://github.com/atom/atom.git
synced 2026-02-15 00:55:14 -05:00
Maintain an active pane container on the workspace
This will be used by many commands that previously only interacted with the center of the workspace.
This commit is contained in:
committed by
Max Brunsfeld
parent
f1e30fe7cf
commit
646047f563
@@ -3,11 +3,18 @@
|
||||
const TextEditor = require('./text-editor')
|
||||
|
||||
module.exports = class WorkspaceCenter {
|
||||
constructor (paneContainer) {
|
||||
constructor ({paneContainer, didActivate, didChangeActivePaneItem}) {
|
||||
this.paneContainer = paneContainer
|
||||
this.didActivate = didActivate
|
||||
this.paneContainer.onDidActivatePane(() => this.didActivate(this))
|
||||
this.paneContainer.onDidChangeActivePaneItem((item) => {
|
||||
didChangeActivePaneItem(this, item)
|
||||
})
|
||||
}
|
||||
|
||||
activate () {}
|
||||
activate () {
|
||||
this.getActivePane().activate()
|
||||
}
|
||||
|
||||
getLocation () {
|
||||
return 'center'
|
||||
|
||||
Reference in New Issue
Block a user