mirror of
https://github.com/atom/atom.git
synced 2026-02-08 05:35:04 -05:00
Add initial panel API.
It can only add things to the left right now.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user