mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Panel containers have the orientation
This commit is contained in:
@@ -11,6 +11,8 @@ class PanelContainerElement extends HTMLElement
|
||||
@subscriptions.add @model.onDidRemovePanel(@panelRemoved.bind(this))
|
||||
@subscriptions.add @model.onDidDestroy(@destroyed.bind(this))
|
||||
|
||||
@setAttribute('orientation', @model.getOrientation())
|
||||
|
||||
panelAdded: ({panel, index}) ->
|
||||
if index >= @childNodes.length
|
||||
@appendChild(panel.getView())
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Public:
|
||||
module.exports =
|
||||
class PanelContainer
|
||||
constructor: ({@viewRegistry}) ->
|
||||
constructor: ({@viewRegistry, @orientation}) ->
|
||||
@emitter = new Emitter
|
||||
@subscriptions = new CompositeDisposable
|
||||
@panels = []
|
||||
@@ -33,6 +33,8 @@ class PanelContainer
|
||||
|
||||
getView: -> @viewRegistry.getView(this)
|
||||
|
||||
getOrientation: -> @orientation
|
||||
|
||||
getPanels: -> @panels
|
||||
|
||||
addPanel: (panel) ->
|
||||
|
||||
Reference in New Issue
Block a user