ObaidUrRehman / ng-drag-drop

Drag & Drop for Angular - based on HTML5 with no external dependencies. :tada:
MIT License
239 stars 123 forks source link

dragOverClass assigned to non valid drop targets #28

Closed GerritK closed 7 years ago

GerritK commented 7 years ago

If I assign the dragOverClass to a draggable (and droppable) element it gets the class assigned at drag start and short after again removed. The draggable helper has now the dragOverClass style.

ObaidUrRehman commented 7 years ago

@GerritK not sure if I understand. Can you show me a Plunkr demonstrating the issue?

GerritK commented 7 years ago

http://plnkr.co/edit/xHKXxXwiH4YzMzSE9xtF?p=preview

If you start dragging one of the items, it gets the dragOverClass assigned.

EDIT: I see why this happens.. the 'dragOverClass' is used for both, the draggable and the droppable directive. I think it should be splitted into seperate directives. For droppable the existing dragOverClass and for draggable maybe a new draggedClass.