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

Function _getInsertDirection

Sortable.js:2310–2316  ·  view source on GitHub ↗

* Gets the direction dragEl must be swapped relative to target in order to make it * seem that dragEl has been "inserted" into that element's position * @param {HTMLElement} target The target whose position dragEl is being inserted at * @return {Number} Direction dr

(target)

Source from the content-addressed store, hash-verified

2308 * @return {Number} Direction dragEl must be swapped
2309 */
2310 function _getInsertDirection(target) {
2311 if (index(dragEl) < index(target)) {
2312 return 1;
2313 } else {
2314 return -1;
2315 }
2316 }
2317
2318 /**
2319 * Generate id

Callers 1

_getSwapDirectionFunction · 0.70

Calls 1

indexFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…