MCPcopy Create free account
hub / github.com/angular/components / drop

Method drop

src/cdk/drag-drop/drop-list-ref.ts:305–327  ·  view source on GitHub ↗

* Drops an item into this container. * @param item Item being dropped into the container. * @param currentIndex Index at which the item should be inserted. * @param previousIndex Index of the item when dragging started. * @param previousContainer Container from which the item got dragged

(
    item: DragRef,
    currentIndex: number,
    previousIndex: number,
    previousContainer: DropListRef,
    isPointerOverContainer: boolean,
    distance: Point,
    dropPoint: Point,
    event: MouseEvent | TouchEvent,
  )

Source from the content-addressed store, hash-verified

303 * @param event Event that triggered the dropping sequence.
304 */
305 drop(
306 item: DragRef,
307 currentIndex: number,
308 previousIndex: number,
309 previousContainer: DropListRef,
310 isPointerOverContainer: boolean,
311 distance: Point,
312 dropPoint: Point,
313 event: MouseEvent | TouchEvent,
314 ): void {
315 this._reset();
316 this.dropped.next({
317 item,
318 currentIndex,
319 previousIndex,
320 container: this,
321 previousContainer,
322 isPointerOverContainer,
323 distance,
324 dropPoint,
325 event,
326 });
327 }
328
329 /**
330 * Sets the draggable items that are a part of this list.

Callers 1

_cleanupDragArtifactsMethod · 0.45

Calls 2

_resetMethod · 0.95
nextMethod · 0.45

Tested by

no test coverage detected