Skip to content

Issue with nested drop elements #11

@apinstein

Description

@apinstein

I tried out your lib for a dnd implementation I needed... I'm not doing your normal "sortable" and needed custom drag & drop zones and your codebase seemed nicely factored for this use case.

For my use case, there's a parent/child relationship:

<div drop="moveToRoot">
   <div drop="moveUnderChild" drag ng-model="story">
         Root Story 1
         <div drag ng-model="story">Child Story 1</div>
  </div>
   <div drop="moveUnderChild" drag ng-model="story">
         Root Story 2
  </div>
</div>

It worked fine for moving Child Story 1 to Root Story 2, but failed to allow dropping on the "moveToRoot" container. I narrowed it down to this line:

https://github.com/fisshy/angular-drag-drop/blob/master/angular-dnd.js#L30

I'm not sure what this LOC does, but by making it just add the class to the el no matter what, it solved my problem.

Would love to help tidy it up for you if you could elucidate its function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions