MCPcopy
hub / github.com/SortableJS/Vue.Draggable / onDragAdd

Function onDragAdd

src/vuedraggable.js:411–422  ·  view source on GitHub ↗
(evt)

Source from the content-addressed store, hash-verified

409 },
410
411 onDragAdd(evt) {
412 const element = evt.item._underlying_vm_;
413 if (element === undefined) {
414 return;
415 }
416 removeNode(evt.item);
417 const newIndex = this.getVmIndex(evt.newIndex);
418 this.spliceList(newIndex, 0, element);
419 this.computeIndexes();
420 const added = { element, newIndex };
421 this.emitChanges({ added });
422 },
423
424 onDragRemove(evt) {
425 insertNodeAt(this.rootContainer, evt.item, evt.oldIndex);

Callers

nothing calls this directly

Calls 1

removeNodeFunction · 0.85

Tested by

no test coverage detected