Add initial panel API.

It can only add things to the left right now.
This commit is contained in:
Ben Ogle
2014-10-14 17:45:13 -07:00
parent 55a5e66701
commit 734a79b7ec
6 changed files with 119 additions and 0 deletions

View File

@@ -65,6 +65,8 @@ class WorkspaceElement extends HTMLElement
window.addEventListener 'focus', handleWindowFocus
@subscriptions.add(new Disposable -> window.removeEventListener 'focus', handleWindowFocus)
@subscriptions.add @model.onDidAddPanel(@panelAdded.bind(this))
@__spacePenView.setModel(@model)
setTextEditorFontSize: (fontSize) ->
@@ -90,6 +92,13 @@ class WorkspaceElement extends HTMLElement
focusPaneViewOnRight: -> @paneContainer.focusPaneViewOnRight()
panelAdded: (panel) ->
panelView = @model.getView(panel)
switch panel.getOrientation()
when 'left'
@horizontalAxis.insertBefore(panelView, @verticalAxis)
atom.commands.add 'atom-workspace',
'window:increase-font-size': -> @getModel().increaseFontSize()
'window:decrease-font-size': -> @getModel().decreaseFontSize()