Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng-drop-success is getting called twice. #255

Open
anagh-p opened this issue Jun 20, 2016 · 1 comment
Open

ng-drop-success is getting called twice. #255

anagh-p opened this issue Jun 20, 2016 · 1 comment

Comments

@anagh-p
Copy link

anagh-p commented Jun 20, 2016

I'm trying to create a kanban board which will use two ng-repeats(nested). One will be for the column, and second will be for the items inside each of these columns.

These are the three kinds of operations(drag and drop) that I am going to do.

  1. Item to item.
  2. Item to heading. //Not important for my problem here.
  3. Item to column.

ISSUE : When I do the Operation 1 from above, first, Operation 3 is triggered. Only then the Operation 1 is triggered.

In other words, the drop gets triggered for the parent div first, and only then it is called for the child div.

QUESTION : Is it possible to disable this scenario? I mean, I need only the item to item(child to child) operation to happen. When this is happening, the item to column(child to parent) operation is irrelevant.

P.S : I went through #223 , but that didn't solve my problem. Any help will be appreciated. Thanks in advance.

        `<div class="board-column"
             ng-drop="true"
             ng-drag="true"
             ng-drop-success="dropComplete()"
             ng-repeat="cars in brands track by $index"> //**************COLUMN**************

            <!--Heading - Start-->
            <div ng-drop="true"
                 ng-drop-success="dropComplete()"
                 class="board-heading">
                {{BRAND}}
            </div> //**************HEADING**************
            <!--Heading - End-->

            <!--Items - Start-->
            <div ng-repeat="car in cars track by $index"                         
                 ng-drop="true"                         
                 ng-drop-success="dropComplete()"
                 class="board-item">

                <div ng-drag="true"
                     ng-drag-data="MY DATA"
                     class="board-item-draggable">
                    {{CAR NAME}}
                </div>

            </div>//**************ITEM**************
            <!--Items - End-->

        </div>`
@aykutdemirel
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants