bevacqua / angularjs-dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/angularjs-dragula
MIT License
509 stars 110 forks source link

Dupes in multiple nested containers #107

Open JerimSD opened 7 years ago

JerimSD commented 7 years ago

Hi, I took a look at the differents issues and solutions but I didn't find anything to fix mine.

Here is my problem. I'm developping a WYSIWYG application structured in rows, columns and components. The rows can be reorganized between them, the columns can be reorganized inside their intial row or moved to another and the components can be reorganized inside their initial column or moved to another.

I've created multiple containers to control the differents areas where the items are allowed to be dropped. Ie, rows can only be dropped in the single row container (ctnRow) and columns can only be dropped in the column containers (ctnCol). There are as many column containers than rows.

My problem seems to come from these multiple column containers. In the first row for example, when I drag a colum from the left and drop it to the right, the following colums seem to be in a "broken" state (you can tell at their strange CSS look). If I then try to drag and drop one of these "broken" column, an empty column appears and if I drag and drop another column I get dupes errors.

Here's a Plunkr where I reproduced my application basis.

I tried a few things but I didn't find any solution. I'm open to any suggestion.