Sortable icon indicating copy to clipboard operation
Sortable copied to clipboard

It does't work for dragging item from small size to big size

Open wangxiujuan opened this issue 9 years ago • 2 comments

image

We would like to drag item from small size to big size. Since we have: if (after && !nextSibling) { el.appendChild(dragEl); } else { target.parentNode.insertBefore(dragEl, after ? nextSibling : target); }

Also after = (nextSibling !== dragEl) && !isLong || halfway && isLong;

if after is true, target.parentNode.insertBefore(dragEl, nextSibling); this is wrong.

wangxiujuan avatar Apr 04 '17 23:04 wangxiujuan

Let's say dragging item 4 to item 1. dragEl is 4 target is 1 nextSibling is 2

If mouse moves to lower 1/2 area in item 1, the result is image

This is wrong.

If mouse moves to up 1/2 area in item 1, the result is correct. image

wangxiujuan avatar Apr 05 '17 00:04 wangxiujuan

Should work as expected in latest version

owen-m1 avatar Jan 17 '19 02:01 owen-m1