Comments (10)
I would also love to see this feature.
from angular-gridster.
It should be possible and may be handled outside of the gridster instances. The gridster items are rendered with an ng-repeat outside the gridster code, so we have to look at a way to listen for an event fired when dragging over the other instance, remove the item from the old scope list and add it to the new scope list. From there I'm not sure if that would result in a new element being created or if it would be possible to move the li to the new container without freaking out ng-repeat.
Any ideas for how to accomplish this?
from angular-gridster.
A project named angular-ui-tree you could have a look, it can do this.
https://github.com/jimliu/angular-ui-tree
发自我的 iPhone
在 2014年4月26日,3:31,Dan Blaisdell [email protected] 写道:
It should be possible and may be handled outside of the gridster instances. The gridster items are rendered with an ng-repeat outside the gridster code, so we have to look at a way to listen for an event fired when dragging over the other instance, remove the item from the old scope list and add it to the new scope list. From there I'm not sure if that would result in a new element being created or if it would be possible to move the li to the new container without freaking out ng-repeat.
Any ideas for how to accomplish this?
—
Reply to this email directly or view it on GitHub.
from angular-gridster.
Has anybody had any luck implementing this?
from angular-gridster.
I haven't yet. I would probably use this as a guide:
https://github.com/angular-ui/ui-sortable
from angular-gridster.
Any news?
from angular-gridster.
Actually I have implemented this for our website.
What I did was I created 3 directives, one GristerMasterControl, which keeps a record of all the gridster that are present in the page. One MulitGridster which i hang on the same element as the grister it self, it adds itself on the GridsterMasterControl. And one FloatingGridster, which I hang on every gridster-item.
From there it is easy, just listen to the same mouse event, or watch when an instance of FloatingGridster is being moved. Calculate the distance from that gridster-item to every MultiGridster, and call a callback on the closest MultiGridster.
from angular-gridster.
Hi Pouja. Could you kindly provide a working demo of this on jsfiddle? I'm sure all of us would really appreciate it. I'm in the process of scoping out the requirements for our project and this is the only item we don't have a solution for.
from angular-gridster.
@freejack I have a draft here https://github.com/Pouja/angular-gridster/tree/feature/multi-gridster. It works, you can pull and check the demo.
But it is currently not in the final version. I still want to improve how you can identify which gridster item is which and wich gridster is which. Currently this is done by passing a 'model' attribute. And I still have to decide which way is the best or correct way to pass information.
Edit:
Another solution, which includes the description I wrote is this https://github.com/Pouja/angular-gridster/tree/feature/multi-gridster-2. As you can see in the demo (if you pull and run) you will see that you have to click to add the items. This is because the distance from a gridster item to a gridster needs to be calculated after the height, width, top, left etc are set for the div element. Otherwise you will get weird distances.
from angular-gridster.
hi, any news on this enhancement? thanks!
from angular-gridster.
Related Issues (20)
- Size limitation on very long grid (the limit is different depending on the browser) HOT 2
- Unable to clone the demo HOT 1
- Unable to clone demo HOT 1
- Gridster module error
- DragEnd event not fired when in iFrame (Chrome browser)
- Maintainer Needed. Please apply HOT 2
- Publish latest version in npm (0.13.15) HOT 1
- Overlap of widgets when max rows is set
- auto resize content of a grid
- angular.resize issue HOT 2
- wrong rowHeight ratio
- JQUERY Gridster Widgets Overlap Issue HOT 1
- Print page-breaks don't work
- fix container of gridster HOT 1
- How to link $scope between widgets
- angular 7 can use? HOT 1
- maxTop in 'angular-gridster/src/angular-gridster.js'
- Is there a way to change 4 corners of an item?
- create "white spaces" while dragging
- Attempting to add a new element and there is no armed behind it fails even though there is a space before it
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-gridster.