Merge pull request #14729 from atom/wl-fix-docks-docs

Fix Docks docs
This commit is contained in:
Wliu
2017-06-07 11:23:50 -04:00
committed by GitHub
3 changed files with 7 additions and 2 deletions

View File

@@ -16,8 +16,8 @@ const CURSOR_OVERLAY_VISIBLE_CLASS = 'atom-dock-cursor-overlay-visible'
// Extended: A container at the edges of the editor window capable of holding items.
// You should not create a Dock directly. Instead, access one of the three docks of the workspace
// via {::getLeftDock}, {::getRightDock}, and {::getBottomDock} or add an item to a dock via
// {Workspace::open}.
// via {Workspace::getLeftDock}, {Workspace::getRightDock}, and {Workspace::getBottomDock}
// or add an item to a dock via {Workspace::open}.
module.exports = class Dock {
constructor (params) {
this.handleResizeHandleDragStart = this.handleResizeHandleDragStart.bind(this)

View File

@@ -3,6 +3,7 @@
const TextEditor = require('./text-editor')
const PaneContainer = require('./pane-container')
// Essential: Represents the workspace at the center of the entire window.
module.exports = class WorkspaceCenter {
constructor (params) {
params.location = 'center'

View File

@@ -1548,18 +1548,22 @@ module.exports = class Workspace extends Model {
Section: Pane Locations
*/
// Essential: Get the {WorkspaceCenter} at the center of the editor window.
getCenter () {
return this.paneContainers.center
}
// Essential: Get the {Dock} to the left of the editor window.
getLeftDock () {
return this.paneContainers.left
}
// Essential: Get the {Dock} to the right of the editor window.
getRightDock () {
return this.paneContainers.right
}
// Essential: Get the {Dock} below the editor window.
getBottomDock () {
return this.paneContainers.bottom
}