Comments (9)
Can you create a demo on jsfiddle or plunkr?
from angular-dragdrop.
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.
@vladir whats the problem with the demo you created?
from angular-dragdrop.
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.
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.
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.
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.
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.
Thanks @vladir
from angular-dragdrop.
Related Issues (20)
- Center Draggable element in DropZone HOT 2
- Hi, HOT 1
- Support for SVG elements
- Suggestion
- Resetting elements to original position?
- drag works but drop doesn't work HOT 1
- Drop cloning the items in container with both dragable and droppable HOT 1
- Draggable not working on <tr>
- dynamically created div is not draggable HOT 1
- How can i get the coordinates of div while dragging HOT 1
- Does not work when compile-time debugging is disabled
- Dragable Control HOT 1
- I am not able to edit text by clicking on it when data-drag ="true", contenteditable="true"
- Drop and add item in Array
- How to use it in ionic project?
- Memory Leak with dynamic dom content
- scrollbar bug in shopping cart demo HOT 1
- onDrop event
- onDrag/onStart not applying stlyle until released
- drag and drop is not working with new jquery/jquery-ui -1.13.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-dragdrop.