Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:RubaXa/Sortable into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
RubaXa committed Jul 28, 2015
2 parents 304c04f + 8e20138 commit ca3e563
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

lastEl,
lastCSS,
lastParentCSS,

oldIndex,
newIndex,
Expand Down Expand Up @@ -611,13 +612,15 @@
if (lastEl !== target) {
lastEl = target;
lastCSS = _css(target);
lastParentCSS = _css(target.parentNode);
}


var targetRect = target.getBoundingClientRect(),
width = targetRect.right - targetRect.left,
height = targetRect.bottom - targetRect.top,
floating = /left|right|inline/.test(lastCSS.cssFloat + lastCSS.display),
floating = /left|right|inline/.test(lastCSS.cssFloat + lastCSS.display)
|| (lastParentCSS.display == 'flex' && lastParentCSS['flex-direction'].indexOf('row') === 0),
isWide = (target.offsetWidth > dragEl.offsetWidth),
isLong = (target.offsetHeight > dragEl.offsetHeight),
halfway = (floating ? (evt.clientX - targetRect.left) / width : (evt.clientY - targetRect.top) / height) > 0.5,
Expand Down

0 comments on commit ca3e563

Please sign in to comment.