Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Wrong items dropped in connected lists #139

Closed

Description

@garymazz

Dragged items land in the wrong place on target, usually Position 1 (index 0). Drag the element where the first drag was 'supposed' to land, the first element is dragged.

Sometimes the item from the wrong list is dropped.

See: http://jsfiddle.net/XS3dW/

Also clone does not work

Activity

  1. thgreasi commented on Mar 4, 2014

    @thgreasi
    Contributor

    You should move the repeater of the inner ol to the inner li. Also from the inner li you might better have to remove the id attribute, since I think its just a text and not binded to the repeaters item.
    As of cloning, please use the search of this repos issues. I think its the last issue answered #138.

  2. garymazz commented on Mar 4, 2014

    @garymazz
    Author

    Thanks, moving ng-repeat to the inner li fixed the issue. I can see why it appeared to almost work and was incorrect. It may require some additional documentation in the readme to explain where jquery's ().sortable is assigned in relation to the ui-sortable element and the repeat. It would avoid a beginner's coding errors, like mine.

    Ok got the clone from #138. If I could make a suggestion, the code for the "no drop" and the clone should be built into directive.

  3. thgreasi commented on Mar 4, 2014

    @thgreasi
    Contributor

    By the next version, I would probably re-validate the clone functionality to be on par with jqueryui. I thought the example would be simpler.
    As of dropping, its better to use the connectWith option only for the source list. That way there inter-list drop would work only one way.

    I'm going to update this example as soon as the next version is ready.

    Also, should this ticket be considered resolved?

  4. garymazz commented on Mar 4, 2014

    @garymazz
    Author

    Thanks. Close the ticket :) I'd like to keep the dialogue on your directive moving. Can you join the angularjs google group ? I'm trying to figure out generalized DnD/cut/paste framework to tie into jquery.

    Sent from my iPhone

    On Mar 4, 2014, at 9:57 AM, Thodoris Greasidis notifications@github.com wrote:

    By the next version, I would probably re-validate the clone functionality to be on par with jqueryui. I thought the example would be simpler.
    As of dropping, its better to use the connectWith option only for the source list. That way there inter-list drop would work only one way.

    I'm going to update this example as soon as the next version is ready.

    Also, should this ticket be considered resolved?

    —
    Reply to this email directly or view it on GitHub.

  5. thgreasi commented on Mar 4, 2014

    @thgreasi
    Contributor

    I just found an jquery-ui issue that has a drop-clone example. It seems that jquery-ui does not provide a simple way to do this. In my opinion restoring the ng-model looks less like the trickery magic the jquery-ui example shows.
    Also created a new pen, removing update&stop() in favor or (properly) utilizing the connectWith option.

  6. garymazz commented on Mar 5, 2014

    @garymazz
    Author

    Jquery provides a good tool set to manipulate the html dom. However, it
    does not always provide the best solution to manipulate the data that
    creates the html dom. The later portion is where angularjs excels and
    provides the syntactic candy and programming advantage.

    I like the new version of the example.. its much simpler to implement an
    much easier to understand.

    email garym at oedata dot com

    On Tue, Mar 4, 2014 at 2:08 PM, Thodoris Greasidis <notifications@github.com

    wrote:

    Closed #139 #139.

    Reply to this email directly or view it on GitHubhttps://github.com//issues/139
    .

  7. thgreasi commented on Sep 16, 2014

    @thgreasi
    Contributor

    Since the drop-clone example mentioned above has changed, just for future reference, I'm adding this fiddle to demonstrate what helper: 'clone' + connectWith actually do by themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions