-
Notifications
You must be signed in to change notification settings - Fork 207
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
Add CDK drag and Drop Support #443
Comments
As currently DOM order doesn't affect areas order you can create an orders array (bound to order input in split area) and shuffle it as a result of drag and drop. |
@Harpush as-split-area has an order that defines the order in which as-split renders areas, right? It would be nice if CDK drag & drop was implemented out of the box to be able to visually re-order areas within the split. Same goes for moving areas from split to split. It would be a nice UX. In my app I need to give those flexibility and and I've seen a few requests on the internet about this for Angular split. Am I making sense? Or maybe I'm missing something. |
With the upcoming refactor the areas order will be determined by DOM position. That means that drag and drop should work as you don't need order anymore. |
@Harpush do you know when the next release is planned? |
To sort areas and move between splits it needs a few sorting list connections properties, sort order properties, plus some Drag visual style template definitions. It does not appear to be much work (have not deep dived yet and new to those) and it would be a great if it was a built-in supported feature to what Split already offers. |
@godind beta is out - you can check if it works for you |
@Harpush I'll give it a shoot next week. Any chance you can share some draft upgrade/change doc to guide how to use it now? |
@Harpush updated and with a few changes, basic operations (split horizontal and vertical, resize, delete split and split-area) work well. I've not played with styles yet. Great work! How would I go about implementing Drag & Drop with the grid layout? Each split would be cdkDropList and each child area a cdkDrag. Can you put splits next to each other or do other splits need to be inside areas? That will create cdkDropList inside cdkDropList. I need users to split as they wish creating rows and columns that changes direction. Thanks |
Not entirely sure what you are trying to accomplish but let me say this:
An example of what you are trying to achieve might make it easier to answer you if this library is meant for it |
I think this use case is more for a grid layout library. Anyway concerning drag and drop - usually you need place to drop at and here I am not sure I understand how you wish for drop to act (add a new area? Push? Swap? Minimize other areas?) It can be accomplished I believe with angular-split but it won't be easy and requires dynamic recursive splits. |
Excellent feed-back. You can close. Thanks for the great support! |
Hi. Love Angular Split!!!
I would like to have CDK Drag and Drop support built so you can sort within a split-area and and drag & drop between as-split.
See: https://material.angular.io/cdk/drag-drop/overview
This is a concept: https://stackblitz.com/edit/angular-split-cdk-dragandrop-test-kzqpgh?file=src%2Fapp%2Fapp.component.html
Thank you
The text was updated successfully, but these errors were encountered: