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

Function MultiDrag

Sortable.js:2790–2823  ·  view source on GitHub ↗
(sortable)

Source from the content-addressed store, hash-verified

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