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.

Draggable clone #138

Closed
Closed

Description

@TheBoef

Im pretty new to Angular, and Im trying to recreate this demo: "http://jqueryui.com/draggable/#sortable" but with mutilple sorted lists.

I got the ui-sortable working on my local machine, but its not working on Plunker... :(
http://embed.plnkr.co/WP8UKJBRWKK3rGy6A4nJ/preview

I can get the buttom 4 lists sortable and draggable with them self, but I want to add a list on the top that can only drag items in de sortable lists. Also the items that are dragged are copied (Just like the example on jqueryui).

I tried using https://github.com/codef0rmer/angular-dragdrop but it didnt got it too work with this ui-sortable.

Anyone has an example or an draggable module that works with this ui-sortable? It needs too has clone function from draggable.

Activity

  1. thgreasi commented on Mar 3, 2014

    @thgreasi
    Contributor

    I didn't know about the draggable/#sortable combo but I think that an issue with a similar use case was submitted at some point.
    The final solution looked like this pen. You essentially clone the elements of the first list by restoring its model to the initial state right after the drag stops.

  2. thgreasi commented on Mar 3, 2014

    @thgreasi
    Contributor

    In the example you provided, the issue was that jquery-ui was loaded before jquery (as shown here).

  3. TheBoef commented on Mar 4, 2014

    @TheBoef
    Author

    Thanks for the example! Working with your solution right now!

  4. thgreasi commented on Mar 4, 2014

    @thgreasi
    Contributor

    I will just repost here:

    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.

    Should this issue be considered resolved?

  5. TheBoef commented on Mar 5, 2014

    @TheBoef
    Author

    Yes, thanks for the help!

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