mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Serialize docks
This commit is contained in:
@@ -154,7 +154,12 @@ module.exports = class Workspace extends Model {
|
||||
deserializer: 'Workspace',
|
||||
paneContainer: this.paneContainer.serialize(),
|
||||
packagesWithActiveGrammars: this.getPackageNamesWithActiveGrammars(),
|
||||
destroyedItemURIs: this.destroyedItemURIs.slice()
|
||||
destroyedItemURIs: this.destroyedItemURIs.slice(),
|
||||
docks: {
|
||||
left: this.docks.left.serialize(),
|
||||
right: this.docks.right.serialize(),
|
||||
bottom: this.docks.bottom.serialize()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +175,13 @@ module.exports = class Workspace extends Model {
|
||||
if (state.destroyedItemURIs != null) {
|
||||
this.destroyedItemURIs = state.destroyedItemURIs
|
||||
}
|
||||
return this.paneContainer.deserialize(state.paneContainer, deserializerManager)
|
||||
this.paneContainer.deserialize(state.paneContainer, deserializerManager)
|
||||
for (let location in this.docks) {
|
||||
const serialized = state.docks && state.docks[location]
|
||||
if (serialized) {
|
||||
this.docks[location].deserialize(serialized, deserializerManager)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getPackageNamesWithActiveGrammars () {
|
||||
|
||||
Reference in New Issue
Block a user