* Insert multi-drag clones * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted * @param {HTMLElement} rootEl
(elementsInserted, rootEl)
| 613 | * @param {HTMLElement} rootEl |
| 614 | */ |
| 615 | function insertMultiDragClones(elementsInserted, rootEl) { |
| 616 | multiDragClones.forEach((clone, i) => { |
| 617 | let target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)]; |
| 618 | if (target) { |
| 619 | rootEl.insertBefore(clone, target); |
| 620 | } else { |
| 621 | rootEl.appendChild(clone); |
| 622 | } |
| 623 | }); |
| 624 | } |
| 625 | |
| 626 | function removeMultiDragElements() { |
| 627 | multiDragElements.forEach(multiDragElement => { |