ObaidUrRehman / ng-drag-drop

Drag & Drop for Angular - based on HTML5 with no external dependencies. :tada:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to get the target element ?

SkYNewZ opened this issue · comments

[ ] bug report
[x] feature request
[x] other

Hi!

I currently start using this library with a multiple element that are draggable & droppable each other.
I can have the draged element with the onDrop event but I need to have the target element on which it's deposited, is it possible ?

Or, in the case of multiple elements inside a single container, to be able to define a "target" in this case. Because you would need to know where, in the container you are dropping your item. This would allow a sorting use case.

I got it to work this way:
(onDrop)="onDrop($event, )"

public onDrop(e: any, target: any): void {
}