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

Function MultiDrag

modular/sortable.complete.esm.js:2784–2817  ·  view source on GitHub ↗
(sortable)

Source from the content-addressed store, hash-verified

2782 clonesHidden;
2783function MultiDragPlugin() {
2784 function MultiDrag(sortable) {
2785 // Bind all private methods
2786 for (var fn in this) {
2787 if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2788 this[fn] = this[fn].bind(this);
2789 }
2790 }
2791 if (!sortable.options.avoidImplicitDeselect) {
2792 if (sortable.options.supportPointer) {
2793 on(document, 'pointerup', this._deselectMultiDrag);
2794 } else {
2795 on(document, 'mouseup', this._deselectMultiDrag);
2796 on(document, 'touchend', this._deselectMultiDrag);
2797 }
2798 }
2799 on(document, 'keydown', this._checkKeyDown);
2800 on(document, 'keyup', this._checkKeyUp);
2801 this.defaults = {
2802 selectedClass: 'sortable-selected',
2803 multiDragKey: null,
2804 avoidImplicitDeselect: false,
2805 setData: function setData(dataTransfer, dragEl) {
2806 var data = '';
2807 if (multiDragElements.length && multiDragSortable === sortable) {
2808 multiDragElements.forEach(function (multiDragElement, i) {
2809 data += (!i ? '' : ', ') + multiDragElement.textContent;
2810 });
2811 } else {
2812 data = dragEl.textContent;
2813 }
2814 dataTransfer.setData('Text', data);
2815 }
2816 };
2817 }
2818 MultiDrag.prototype = {
2819 multiDragKeyDown: false,
2820 isMultiDrag: false,

Callers

nothing calls this directly

Calls 1

onFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…