Rename Workspace::getPanes to Workspace::getPaneViews

This commit is contained in:
probablycorey
2014-02-18 15:13:27 -08:00
committed by Corey Johnson & Nathan Sobo
parent ef263580df
commit b042dffc2c
5 changed files with 20 additions and 13 deletions

View File

@@ -54,24 +54,24 @@ class PaneContainerView extends View
confirmClose: ->
saved = true
for pane in @getPanes()
for pane in @getPaneViews()
for item in pane.getItems()
if not pane.promptToSaveItem(item)
saved = false
break
saved
getPanes: ->
getPaneViews: ->
@find('.pane').views()
indexOfPane: (pane) ->
@getPanes().indexOf(pane.view())
@getPaneViews().indexOf(pane.view())
paneAtIndex: (index) ->
@getPanes()[index]
@getPaneViews()[index]
eachPaneView: (callback) ->
callback(pane) for pane in @getPanes()
callback(pane) for pane in @getPaneViews()
paneAttached = (e) -> callback($(e.target).view())
@on 'pane:attached', paneAttached
off: => @off 'pane:attached', paneAttached
@@ -117,7 +117,7 @@ class PaneContainerView extends View
pane = @getActivePane()
box = @boundingBoxForPane(pane)
panes = @getPanes()
panes = @getPaneViews()
.filter (otherPane) =>
otherBox = @boundingBoxForPane(otherPane)
switch direction
@@ -143,3 +143,6 @@ class PaneContainerView extends View
right: {x: boundingBox.right, y: boundingBox.top}
top: {x: boundingBox.left, y: boundingBox.top}
bottom: {x: boundingBox.left, y: boundingBox.bottom}
getPanes: ->
@getPaneViews()