       when 'down'  then target.splitDown()
     tab = e.target
     toPane ?= target
-    fromPane = @paneForTab tab
+    fromPane = tab.pane
     return if toPane is fromPane
-    item = @itemForTab tab
+    item = tab.item
     fromPane.moveItemToPane item, toPane
     toPane.activateItem item
     toPane.activate()

{closest, indexOf, matches} = require './html-helpers'

module.exports =


  getPaneAt: (coords) ->
    @test.pane or @getElement(@lastCoords, 'atom-pane')?.getModel()

  isOnlyTabInPane: (pane, tab) ->
    pane.getItems().length is 1 and pane is tab.pane

  normalizeCoords: ({left, top, width, height}, [x, y]) ->
    [(x-left)/width, (y-top)/height]
