Add PaneView::getModel()

This commit is contained in:
Ben Ogle
2014-09-04 16:41:34 -07:00
parent a81393320c
commit 336afc32c2
2 changed files with 5 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ describe "PaneView", ->
runs ->
pane = container.getRoot()
paneModel = pane.model
paneModel = pane.getModel()
paneModel.addItems([view1, editor1, view2, editor2])
afterEach ->
@@ -259,7 +259,7 @@ describe "PaneView", ->
describe "when a pane is split", ->
it "builds the appropriate pane-row and pane-column views", ->
pane1 = pane
pane1Model = pane.model
pane1Model = pane.getModel()
pane.activateItem(editor1)
pane2Model = pane1Model.splitRight(items: [pane1Model.copyActiveItem()])

View File

@@ -84,6 +84,9 @@ class PaneView extends View
@model.destroy()
@command 'pane:close-other-items', => @destroyInactiveItems()
# Essential: Returns the {Pane} model underlying this pane view
getModel: -> @model
# Deprecated: Use ::destroyItem
removeItem: (item) ->
deprecate("Use PaneView::destroyItem instead")