- this._currentDrag.currentY = scrollY + pageY - offset;
-
- // this._reorderItems();
- }
- });
-
- // When an item is dragged, we need to reorder any items for sorting purposes
- ReorderDrag.prototype._getReorderIndex = function() {
- var self = this;
-
- var siblings = Array.prototype.slice.call(self._currentDrag.placeholder.parentNode.children)
- .filter(function(el) {
- return el.nodeName === self.el.nodeName && el !== self.el;
- });
-
- var dragOffsetTop = self._currentDrag.currentY;
- var el;
- for (var i = 0, len = siblings.length; i < len; i++) {
- el = siblings[i];
- if (i === len - 1) {
- if (dragOffsetTop > el.offsetTop) {