mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
Add Pane.itemForPath
This commit is contained in:
committed by
probablycorey
parent
c6729e9df1
commit
829bfa0a10
@@ -67,6 +67,9 @@ class Pane extends View
|
||||
item.destroy?()
|
||||
@cleanupItemView(item)
|
||||
|
||||
itemForPath: (path) ->
|
||||
_.detect @items, (item) -> item.getPath?() is path
|
||||
|
||||
cleanupItemView: (item) ->
|
||||
if item instanceof $
|
||||
item.remove()
|
||||
@@ -101,7 +104,6 @@ class Pane extends View
|
||||
|
||||
verticalGridUnits: -> 1
|
||||
|
||||
|
||||
splitUp: (view) ->
|
||||
@split(view, 'column', 'before')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user