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

Function eventProperties

plugins/MultiDrag/MultiDrag.js:554–584  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

552 }
553 },
554 eventProperties() {
555 const oldIndicies = [],
556 newIndicies = [];
557
558 multiDragElements.forEach(multiDragElement => {
559 oldIndicies.push({
560 multiDragElement,
561 index: multiDragElement.sortableIndex
562 });
563
564 // multiDragElements will already be sorted if folding
565 let newIndex;
566 if (folding && multiDragElement !== dragEl) {
567 newIndex = -1;
568 } else if (folding) {
569 newIndex = index(multiDragElement, ':not(.' + this.options.selectedClass + ')');
570 } else {
571 newIndex = index(multiDragElement);
572 }
573 newIndicies.push({
574 multiDragElement,
575 index: newIndex
576 });
577 });
578 return {
579 items: [...multiDragElements],
580 clones: [...multiDragClones],
581 oldIndicies,
582 newIndicies
583 };
584 },
585 optionListeners: {
586 multiDragKey(key) {
587 key = key.toLowerCase();

Callers

nothing calls this directly

Calls 1

indexFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…