Add all Tool Panel append and prepend methods

This commit is contained in:
probablycorey
2014-01-03 15:32:34 -08:00
parent 5d99acd8c5
commit 9f32a24e7e
2 changed files with 30 additions and 4 deletions

View File

@@ -272,12 +272,38 @@ class WorkspaceView extends View
getOpenBufferPaths: ->
_.uniq(_.flatten(@getEditorViews().map (editorView) -> editorView.getOpenBufferPaths()))
prependToBottom: (element)->
# Public: Prepends the element to the top of the window.
prependToTop: (element) ->
@vertical.prepend(element)
# Public: Appends the element to the top of the window.
appendToTop: (element) ->
@panes.before(element)
# Public: Prepends the element to the bottom of the window.
prependToBottom: (element) ->
@panes.after(element)
appendToBottom: (element)->
# Public: Appends the element to bottom of the window.
appendToBottom: (element) ->
@vertical.append(element)
# Public: Prepends the element to the left side of the window.
prependToLeft: (element) ->
@horizontal.prepend(element)
# Public: Appends the element to the left side of the window.
appendToLeft: (element) ->
@vertical.before(element)
# Public: Prepends the element to the right side of the window.
prependToRight: (element) ->
@vertical.after(element)
# Public: Appends the element to the right side of the window.
appendToRight: (element) ->
@horizontal.append(element)
# Public: Returns the currently focused {Pane}.
getActivePane: ->
@panes.getActivePane()