-
Notifications
You must be signed in to change notification settings - Fork 64
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
[Feature Request] Parent Children drag event interactions #74
Comments
So I quickly took a look at your StackBlitz and also how Google Drive does it. I think this is not really the responsibility of this library. As far as I can see, Google Drive only allows to drag an element if it is selected. So you might need to enable/disable the drag-and-drop as well as the drag-to-select. So you would disable drag and drop for all items unless they are selected. If you start dragging an element that is selected, it allows you to drag that element elsewhere. In that case the drag-to-select would need to be disabled, or at least the selected items need to be disabled. If you drag on an element that is not selected, then you would just disable dragging and the drag-to-select kicks in. I am wondering if this would require something like @timdeschryver Curious to hear your thoughts on this. |
@d3lm Thanks for your quick response! Now I can do something like this with the
So can somewhat reproduce the Google Drive behavior, but still there are some differences:
So I think the feature I would like to have in Sorry, the description might be a little complicated. Please let me know if there are any thing unclear. |
@d3lm I think |
Yep, I think we can add this output. Do you think that should be enough to make it work with the DnD library from the Angular CDK? Curious to hear your thoughts. Maybe you have a solution in mind that is less or even not hacky at all. |
I am not sure if this would work with Angular CDK Drag and Drop. In the Stackblitz I wrote my own handler for I think in order to replicate the GDrive effect, we probably need to provide the following API such that the entire event chain is like follows:
I am not sure if this is easy to implement. I went through the source code and it seems that there are a lot of callbacks registered in the What do you think? |
@d3lm do you have any comments on this? Curious to hear your thoughts. |
Did you ever figure out how to do this? |
Hey, I need to revisit this and think about it. Was working on a different feature (range selection, #89) first. I ll definitely come back to this. Any help is much appreciated, and if you have concrete ideas on how this could work then please go ahead and post it here. I'd also love to see someone working on a PR 🙌 |
This is a feature request (or if it is already achievable, please let me know). Might be related to #70.
Let me describe it briefly:
Here is the StackBlitz for the MWE: https://stackblitz.com/edit/angular-sbkxtf
So as you can see, we have a container and we have some children in it. The container is
dts-select-container
and the children aredraggable="true"
.When I start dragging the child:
dragstart
of the child fired, so we can drag around the childMy expected behavior is like Google Drive:
Where
dragstart
will be firstly fired in the container (so selection box shows up), when some items are selected,dragstart
will be fired for those children and some animations shows up, afterdragend
fired, the selection box will NOT re-activately immediately unless the nextdragstart
fired. So eitherdragstart
will be fired in the parent or child depends on whether there are selected things.It is achievable with
ngx-drag-to-select
?@d3lm
The text was updated successfully, but these errors were encountered: