Similar to #144, is there a way to set the style for the element that's being dragged? Currently it looks transparent.
UPDATE: duplicates #53.
No way, it's made by the browser.
Hm... Kendo does it: http://demos.telerik.com/kendo-ui/sortable/linkedlists
Because they do not use Drag'n'Drop API.
The setDragImage API call can be used to set the ghost image.
I know about it, already there is a method setData, but it's not what people want.
This may be an example of how Webix does it with the HTML5 native DnD API: http://docs.webix.com/samples/22_dnd/06_native_dnd.html
The setDragImage API call can be used to set the ghost image.
I know about it, already there is a method setData, but it's not what people want.
So, this feature is just not implemented? Are you going to implement it? There is no limitations on DnD API.
I can see that it could be done manually by .addEventListener on every draggable element, like:
var dragIcon = document.createElement('img');
dragIcon.src = 'some_img.png';
var all_draggable_elements = document.getElementsByClassName('draggable_classname');
for (var i = 0; i < all_draggable_elements.length; i++) {
all_draggable_elements[i].addEventListener('dragstart', function(event) {
event.dataTransfer.setDragImage(dragIcon, 0, 0);
});
}
Also there are various ways of customizing.
i dont know if this is a bug , but when i defined tthis css .sortable-fallback{
visibility:hidden;
}
the element cloned ( follows the pointer) becomes customizable... which is Good, because i was trying hard to find a way to hide that thing...
Most helpful comment
So, this feature is just not implemented? Are you going to implement it? There is no limitations on DnD API.
I can see that it could be done manually by .addEventListener on every draggable element, like:
Also there are various ways of customizing.