I need some help.
I am using the angular-dragula.js and needed to set up that when you drag any object to another list, it goes to the end. Even if I drop anywhere he goes to the end of the list.
Does anyone have any idea how can I do this? Already researched in various locations and without any success.
this is an example, but that only works clicking on the item needed to do work when dragged.
jsFiddle Demo Here
drake = dragula([left1, right1]);
drake.on('drop', function(el, target, source, sibling){
});
var leftList = document.querySelector('#left1');
var rightList = document.querySelector('#right1');
var list = document.querySelectorAll('#right1 li, #left1 li');
for (var i = 0; i < list.length; i++) {
list[i].addEventListener('click', function(){
drake.start(this);
if (this.parentNode.id == 'right1') {
leftList.appendChild(this);
} else {
rightList.appendChild(this);
}
drake.end();
});
}