Giter Club home page Giter Club logo

Comments (9)

codef0rmer avatar codef0rmer commented on August 20, 2024

Can you create a demo on jsfiddle or plunkr?

from angular-dragdrop.

vladir avatar vladir commented on August 20, 2024

Thanks for your quick response. I have created the demo see here: http://jsfiddle.net/vladir/KVzap/12/, I've used a similar case of one you have in the demos dir. If you need something else, just let me know. Thanks in advance,

Kind regards,
Vladir

from angular-dragdrop.

codef0rmer avatar codef0rmer commented on August 20, 2024

@vladir whats the problem with the demo you created?

from angular-dragdrop.

vladir avatar vladir commented on August 20, 2024

What I want is to make possible that the big items can work without affect the small ones, and vice versa. For example if you try to drag and drop the "Item3 list1" to where is "Item2 list1", they should interchange their positions (it is what I want they do). Also, the same for the small items, and when we drag and drop the small items, which belong to a big item, they should interchange position inside its parent (the big item), but without affecting the other small items that aren't in this big item. For example if you move "Item1" to where is "Item2" inside the big item "Item3 list1", the small "Item1" and "Item2" autside "Item3 list1" should so nothing. Did you get it? Please, if you need more details, only let me know. Thanks.

from angular-dragdrop.

codef0rmer avatar codef0rmer commented on August 20, 2024

Oh I see. You have nested droppables and hence the directive is not able to figure out where to drop the draggable item. The fix is to apply the accept option on the droppables using data-jqyoui-options.

On first droppables (the big tiles): data-jqyoui-options="{accept:'.btn-draggable[ng-model=list1]'}
On second droppables (the small tiles): data-jqyoui-options="{accept:'li.btn-draggable[ng-model=list2]'}"

This way small tiles can be swapped with small tiles only and big tiles with big tiles.

Demo: http://jsfiddle.net/WHLZG/3/

from angular-dragdrop.

vladir avatar vladir commented on August 20, 2024

Great! Thanks a lot! I have seen that most of what I wanted to do is working as a charm in your demo. Only one detail, could we have the small tiles work only for the "scope" of its parent? I noticed that when I swap small tiles all small tiles swap also in each big tile. Thanks again by your help and your time.

from angular-dragdrop.

codef0rmer avatar codef0rmer commented on August 20, 2024

Are you saying if I alter the ordering of small tiles within the first big tile then remaining tiles in other big tiles should be untouched?

I think thats not possible because all small tiles in different big tiles share the same model. If you can take a separate model for each set of small tiles then you can fix the issue.

from angular-dragdrop.

vladir avatar vladir commented on August 20, 2024

Thank you very much. Yes, you're right, the small ones share the same model. You have done a great work! Thanks again.

from angular-dragdrop.

codef0rmer avatar codef0rmer commented on August 20, 2024

Thanks @vladir

from angular-dragdrop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.