mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Rename Workspace::getPanes to Workspace::getPaneViews
This commit is contained in:
committed by
Corey Johnson & Nathan Sobo
parent
ef263580df
commit
b042dffc2c
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user