MCPcopy Index your code
hub / github.com/SortableJS/Sortable / drop

Function drop

plugins/Swap/Swap.js:42–56  ·  view source on GitHub ↗
({ activeSortable, putSortable, dragEl })

Source from the content-addressed store, hash-verified

40 cancel();
41 },
42 drop({ activeSortable, putSortable, dragEl }) {
43 let toSortable = (putSortable || this.sortable);
44 let options = this.options;
45 lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
46 if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
47 if (dragEl !== lastSwapEl) {
48 toSortable.captureAnimationState();
49 if (toSortable !== activeSortable) activeSortable.captureAnimationState();
50 swapNodes(dragEl, lastSwapEl);
51
52 toSortable.animateAll();
53 if (toSortable !== activeSortable) activeSortable.animateAll();
54 }
55 }
56 },
57 nulling() {
58 lastSwapEl = null;
59 }

Callers

nothing calls this directly

Calls 2

toggleClassFunction · 0.90
swapNodesFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…