Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Fix positioning of placeholder with multiline tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
forivall committed Mar 27, 2016
1 parent 1200c00 commit db27fbb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/tab-bar-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class TabBarView extends HTMLElement
@closeTab(tab)
pathsToOpen = [atom.project.getPaths(), itemURI].reduce ((a, b) -> a.concat(b)), []
atom.open({pathsToOpen: pathsToOpen, newWindow: true, devMode: atom.devMode, safeMode: atom.safeMode})

splitTab: (fn) ->
if item = @querySelector('.right-clicked')?.item
if copiedItem = @copyItem(item)
Expand Down Expand Up @@ -263,6 +263,9 @@ class TabBarView extends HTMLElement
placeholder = @getPlaceholder()
return unless placeholder?

top = sortableObjects[Math.max(0, newDropTargetIndex - 1)].offsetTop
placeholder.style.top = if top then "#{top}px" else ""

if newDropTargetIndex < sortableObjects.length
element = sortableObjects[newDropTargetIndex]
element.classList.add 'is-drop-target'
Expand Down

0 comments on commit db27fbb

Please sign in to comment.