Browse Source

Merge pull request #411 from ajwild/dev

Allow click events for touch devices
pull/408/merge
Lebedev Konstantin 9 years ago
parent
commit
5509a9f959
  1. 4
      Sortable.js

4
Sortable.js

@ -458,6 +458,8 @@
dy = touch.clientY - tapEvt.clientY, dy = touch.clientY - tapEvt.clientY,
translate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)'; translate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)';
moved = true;
touchEvt = touch; touchEvt = touch;
moved = true; moved = true;
@ -553,6 +555,8 @@
!options.dragoverBubble && evt.stopPropagation(); !options.dragoverBubble && evt.stopPropagation();
} }
moved = true;
if (activeGroup && !options.disabled && if (activeGroup && !options.disabled &&
(isOwner (isOwner
? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list

Loading…
Cancel
Save