You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to preserve the original one when drag an item from one grid to another? #661
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.
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 gridstack.js! Your feedback is important to us - we need this continuous feedback to be sure we're delivering the correct features!
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.
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 develop branch when it's complete, but I'd prefer a bit more testers.
Activity
radiolips commentedon May 11, 2017
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
gridstack.js! Your feedback is important to us - we need this continuous feedback to be sure we're delivering the correct features!shijistar commentedon May 11, 2017
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!
radiolips commentedon May 11, 2017
@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.
This also is requested in #396 #499.
mandys commentedon May 11, 2017
@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..
radiolips commentedon May 11, 2017
@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.
mandys commentedon May 11, 2017
Yes. We don't need the draggables in a grid. They will live in a sidebar and dragged onto the stage (grid).
radiolips commentedon May 11, 2017
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
developbranch when it's complete, but I'd prefer a bit more testers.mandys commentedon May 11, 2017
Just joined
radiolips commentedon May 15, 2017
This works on the
developbranch now. Please be sure to usedraggablesettinghelper: clone.