Giter Club home page Giter Club logo

Comments (10)

tkorkalainen avatar tkorkalainen commented on September 27, 2024

I would also love to see this feature.

from angular-gridster.

danomatic avatar danomatic commented on September 27, 2024

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.

JimLiu avatar JimLiu commented on September 27, 2024

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.

michaelferry avatar michaelferry commented on September 27, 2024

Has anybody had any luck implementing this?

from angular-gridster.

danomatic avatar danomatic commented on September 27, 2024

I haven't yet. I would probably use this as a guide:

https://github.com/angular-ui/ui-sortable

from angular-gridster.

rochapablo avatar rochapablo commented on September 27, 2024

Any news?

from angular-gridster.

Pouja avatar Pouja commented on September 27, 2024

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.

freejack avatar freejack commented on September 27, 2024

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.

Pouja avatar Pouja commented on September 27, 2024

@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.

eugene-palacios avatar eugene-palacios commented on September 27, 2024

hi, any news on this enhancement? thanks!

from angular-gridster.

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.