We don't want the ghost element (the item being dragged) to be opaque.
Alas, but it is controls the browser.
Hi :)
It's probably to late for you, but I hope it will help others :
Sortable.create(document.getElementById('yourList'), {
setData: function (dataTransfer, dragEl) {
var fakeGhost = dragEl.cloneNode(true);
fakeGhost.style.opacity = 0;
document.body.appendChild(fakeGhost);
dataTransfer.setDragImage(fakeGhost, 0, 0);
}
});
Inspired by http://www.kryogenix.org/code/browser/custom-drag-image.html
Thanks for making Sortable.js
@n457 that just makes the ghost dissappear. I think what he asks for is a ghost that has opacity 1
Most helpful comment
@n457 that just makes the ghost dissappear. I think what he asks for is a ghost that has opacity 1