This is a migrated thread and some comments may be shown as answers.

Revert animation not working when dragEnd.

1 Answer 142 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
Vedat
Top achievements
Rank 1
Vedat asked on 08 Mar 2018, 11:45 AM

Hi, 

I have a "table" and labels inside table's td.I applied kendoDraggable to all labels in tds. And the all tds also droppable. Briefly, i want to move elements (which insde table cell) to another cell. 

Everything seems ok, i can drag and drop but when i drag element to not droppable area, element disappeared, not reverting with animation. And some laggy behaviour when dragging. Am i missing a point ?

Here is my implementation

$("#itemTable label.item-label").kendoDraggable({
                hint: function (element) {
                    var clone = $(element).clone();
                    $(clone).css('border', "1px solid black");
                    $(clone).css('width', 'auto');
                    $(clone).css('background-color', '#ffffff');
                    return clone;
                },
                dragstart: draggableOnDragStart,
                drag: draggableOnDrag,
                dragend: draggableOnDragEnd,
                dragcancel: draggableOnCancel
            });

            $("#itemTable tbody tr td").kendoDropTarget({
                dragenter: droptargetOnDragEnter,
                dragleave: droptargetOnDragLeave,
                drop: droptargetOnDrop
            });

            function droptargetOnDrop(e) {
                console.log("drop");
                console.log(e);
                $(e.draggable.currentTarget).appendTo($(e.dropTarget[0]));
            }



Thanks   

1 Answer, 1 is accepted

Sort by
0
Vedat
Top achievements
Rank 1
answered on 09 Mar 2018, 12:05 PM
Finally i found the missing point. I applied draggable property to label. When i changed it to div, it's worked.  

Thanks
Tags
Drag and Drop
Asked by
Vedat
Top achievements
Rank 1
Answers by
Vedat
Top achievements
Rank 1
Share this question
or