Closed Lanseer closed 3 years ago
dragulaService.dragend.subscribe((value) => { let [el, target, source] = value.slice(1); var rect = el.getBoundingClientRect().top; console.log(rect.top); console.log(el); console.log(target); console.log(source); }); the log is the original position of el,I need get current position when dragend occurred,anyone can help me ,thx in advance!
let dragEl = value[1];
let list = Array.prototype.filter.call(value[1].parentNode.childNodes, (node) => {
return node.tagName === 'TR';
});
this.newIndex = list.findIndex((node) => {
return node === dragEl;
});