mirror of
https://github.com/atom/atom.git
synced 2026-02-08 05:35:04 -05:00
Integrate the pane containers into the workspace
This commit is contained in:
@@ -65,7 +65,17 @@ class WorkspaceElement extends HTMLElement
|
||||
window.addEventListener 'focus', handleWindowFocus
|
||||
@subscriptions.add(new Disposable -> window.removeEventListener 'focus', handleWindowFocus)
|
||||
|
||||
@subscriptions.add @model.onDidAddPanel(@panelAdded.bind(this))
|
||||
@panelContainers =
|
||||
top: @model.panelContainers.top.getView()
|
||||
left: @model.panelContainers.left.getView()
|
||||
right: @model.panelContainers.right.getView()
|
||||
bottom: @model.panelContainers.bottom.getView()
|
||||
|
||||
@horizontalAxis.insertBefore(@panelContainers.left, @verticalAxis)
|
||||
@horizontalAxis.appendChild(@panelContainers.right)
|
||||
|
||||
@verticalAxis.insertBefore(@panelContainers.top, @paneContainer)
|
||||
@verticalAxis.appendChild(@panelContainers.bottom)
|
||||
|
||||
@__spacePenView.setModel(@model)
|
||||
|
||||
@@ -92,13 +102,6 @@ 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