mirror of
https://github.com/atom/atom.git
synced 2026-01-27 15:58:00 -05:00
fix logic error in shouldAllowDrag
This commit is contained in:
@@ -47,7 +47,7 @@ class Tabs extends SortableList
|
||||
|
||||
shouldAllowDrag: ->
|
||||
panes = rootView.find('.pane')
|
||||
panes.length == 1 && panes.find('.sortable').length > 0
|
||||
!(panes.length == 1 && panes.find('.sortable').length == 1)
|
||||
|
||||
onDragStart: (event) =>
|
||||
super
|
||||
@@ -79,11 +79,9 @@ class Tabs extends SortableList
|
||||
draggedTab.insertAfter(droppedNearTab)
|
||||
|
||||
currentDraggedTabIndex = draggedTab.index()
|
||||
#console.log ".#{Tabs.viewClass()} .sortable:eq(#{previousDraggedTabIndex})"
|
||||
toEditor.editSessions.splice(currentDraggedTabIndex, 0, fromEditor.editSessions.splice(previousDraggedTabIndex, 1)[0])
|
||||
|
||||
@setActiveTab(currentDraggedTabIndex)
|
||||
console.log fromPaneIndex, toPaneIndex, currentDraggedTabIndex
|
||||
fromEditor.setActiveEditSessionIndex(0) if fromPaneIndex != toPaneIndex
|
||||
toEditor.setActiveEditSessionIndex(currentDraggedTabIndex)
|
||||
toEditor.focus()
|
||||
|
||||
Reference in New Issue
Block a user