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

Function MultiDrag

modular/sortable.core.esm.js:2785–2818  ·  view source on GitHub ↗
(sortable)

Source from the content-addressed store, hash-verified

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