Add PaneContainer::observePanes and ::onDidAddPane

This commit is contained in:
Nathan Sobo
2014-08-28 17:14:15 -06:00
parent 5471e9bccc
commit cee7539e35
4 changed files with 52 additions and 6 deletions

View File

@@ -55,6 +55,16 @@ class Pane extends Model
# Called by the view layer to construct a view for this model.
getViewClass: -> PaneView ?= require './pane-view'
getParent: -> @parent
setParent: (@parent) -> @parent
getContainer: -> @container
setContainer: (container) ->
container.didAddPane({pane: this}) unless container is @container
@container = container
###
Section: Event Subscription
###