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

Function _deselectMultiDrag

plugins/MultiDrag/MultiDrag.js:485–509  ·  view source on GitHub ↗
(evt)

Source from the content-addressed store, hash-verified

483 },
484
485 _deselectMultiDrag(evt) {
486 if (typeof dragStarted !== "undefined" && dragStarted) return;
487
488 // Only deselect if selection is in this sortable
489 if (multiDragSortable !== this.sortable) return;
490
491 // Only deselect if target is not item in this sortable
492 if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;
493
494 // Only deselect if left click
495 if (evt && evt.button !== 0) return;
496
497 while (multiDragElements.length) {
498 let el = multiDragElements[0];
499 toggleClass(el, this.options.selectedClass, false);
500 multiDragElements.shift();
501 dispatchEvent({
502 sortable: this.sortable,
503 rootEl: this.sortable.el,
504 name: 'deselect',
505 targetEl: el,
506 originalEvent: evt
507 });
508 }
509 },
510
511 _checkKeyDown(evt) {
512 if (evt.key === this.options.multiDragKey) {

Callers

nothing calls this directly

Calls 3

closestFunction · 0.90
toggleClassFunction · 0.90
dispatchEventFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…