mirror of
https://github.com/atom/atom.git
synced 2026-02-06 20:55:33 -05:00
Add workspace.toggle() method
This commit is contained in:
12
src/dock.js
12
src/dock.js
@@ -88,10 +88,22 @@ module.exports = class Dock {
|
||||
this.setState({draggingItem})
|
||||
}
|
||||
|
||||
activate () {
|
||||
this.setState({open: true})
|
||||
}
|
||||
|
||||
hide () {
|
||||
this.setState({open: false})
|
||||
}
|
||||
|
||||
toggle () {
|
||||
this.setState({open: !this.state.open})
|
||||
}
|
||||
|
||||
isOpen () {
|
||||
return this.state.open
|
||||
}
|
||||
|
||||
setState (newState) {
|
||||
const prevState = this.state
|
||||
const nextState = Object.assign({}, prevState, newState)
|
||||
|
||||
Reference in New Issue
Block a user