mirror of
https://github.com/atom/atom.git
synced 2026-02-09 22:24:59 -05:00
Change Editor.proto.split method to use new RootView.proto.addPane method.
RootView.proto.addPane takes a view to add, a sibling to add it next to, an axis along which to add (row or column), and a side (before or after)
This commit is contained in:
@@ -468,15 +468,10 @@ class Editor extends View
|
||||
splitDown: ->
|
||||
@split('column', 'after')
|
||||
|
||||
split: (axis, insertMethod) ->
|
||||
unless @parent().hasClass axis
|
||||
container = $$ -> @div class: axis
|
||||
container.insertBefore(this).append(this.detach())
|
||||
|
||||
split: (axis, side) ->
|
||||
return unless rootView = @rootView()
|
||||
editor = new Editor(@getEditorState())
|
||||
this[insertMethod](editor)
|
||||
@rootView().adjustSplitPanes()
|
||||
editor
|
||||
rootView.addPane(editor, this, axis, side)
|
||||
|
||||
remove: (selector, keepData) ->
|
||||
return super if keepData
|
||||
|
||||
Reference in New Issue
Block a user