Panel containers have the orientation

This commit is contained in:
Ben Ogle
2014-10-16 16:16:49 -07:00
parent 5c2e55861c
commit 83e5873f3b
3 changed files with 9 additions and 2 deletions

View File

@@ -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())

View File

@@ -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) ->