-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to preserve the original one when drag an item from one grid to another? #661
Comments
Hi, @shijistar ! Preserving the original widget isn't currently possible. However, due to an overwhelming request for it, we plan on adding it very soon. #133 has some requests for this feature as well. For the time being, you can find upcoming features mentioned in our blog post here. We need to work to figure out what we can move to allow for widget cloning (your request here) to be completed sooner. You can follow the blog, where I'll post gridstack updates. I'll be sure to mention our plan for this and other multiple-grid features. Thanks for using |
Thank you @radiolips for your reply. I'm very happy to hear it's in the plan. I hope it appears in v1.0 :-) I love gridstack so much, as it provides fantastic user experience that layout the reports like building blocks. Thank you guys for the such wonderful work! |
@shijistar I've been able to create a working example. As with the multi-grid features, it'll be experimental until everyone has had some time to test it, but it'll be in version 1. Continue to monitor my blog for more information. I'll post in the next few days about how this will work. |
@radiolips i had requested this yesterday as well :) Would you be kind enough to share your solution ? We are trying to solve it in a round about way ( eg: When the drag start happens we copy the html of the widget into their parent container so while the move is happening a copy of widget is left behind. This isn't the exact jquery clone way. But, imagine it as a pack of cards. When you pick the first one, there is another one below it..We keep doing that..round about.. |
@mandys Sure. For the time being, I am NOT focusing on getting it to work grid-to-grid. If you check the two grid example, there's a widget on the top-left. It's not actually in a grid. That widget will be able to be cloned. Will that satisfy your requirements? I assume it will - it's actually slightly simpler than needing multiple grids, because I assume that for cloning you don't actually want the initial widget in a grid. Let me know, though. |
Yes. We don't need the draggables in a grid. They will live in a sidebar and dragged onto the stage (grid). |
Great. Are you on our Slack? If not, could you join? I could create a patch of the code when I'm done for you to test. If you don't want to, I can push the code to the |
Just joined |
This works on the |
Lets see this official sample: http://troolee.github.io/gridstack.js/demo/two.html
I want to know if it's possible to preserve the original item when we drag one from left grid to the right? i.e. copy from left to right. I didn't see it from api options.
It's really important to me. Any help is so much appreciated! Thanks.
The text was updated successfully, but these errors were encountered: