-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[cdkDrag] cdkDragEnded should be fired before transition animation #14498
Comments
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 14, 2018
Adds the `cdkDragReleased` event, in addition to `cdkDragEnded`. The difference between released and ended is that released will fire as soon as the user has released the item, whereas ended will fire once all animations are done. The former is useful to customize the animation on drop, based on where the item is being dropped. Fixes angular#14498.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 14, 2018
Adds the `cdkDragReleased` event, in addition to `cdkDragEnded`. The difference between released and ended is that released will fire as soon as the user has released the item, whereas ended will fire once all animations are done. The former is useful to customize the animation on drop, based on where the item is being dropped. Fixes angular#14498.
crisbeto
added a commit
to crisbeto/material2
that referenced
this issue
Dec 14, 2018
Adds the `cdkDragReleased` event, in addition to `cdkDragEnded`. The difference between released and ended is that released will fire as soon as the user has released the item, whereas ended will fire once all animations are done. The former is useful to customize the animation on drop, based on where the item is being dropped. Fixes angular#14498.
jelbourn
pushed a commit
that referenced
this issue
Dec 18, 2018
Adds the `cdkDragReleased` event, in addition to `cdkDragEnded`. The difference between released and ended is that released will fire as soon as the user has released the item, whereas ended will fire once all animations are done. The former is useful to customize the animation on drop, based on where the item is being dropped. Fixes #14498.
josephperrott
pushed a commit
to josephperrott/components
that referenced
this issue
Jan 14, 2019
Adds the `cdkDragReleased` event, in addition to `cdkDragEnded`. The difference between released and ended is that released will fire as soon as the user has released the item, whereas ended will fire once all animations are done. The former is useful to customize the animation on drop, based on where the item is being dropped. Fixes angular#14498.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The cdkDragEnded fires after the animation (which makes sense in the literal case - because then the drag has actually ended), but if you want to interfere with the drag animation, there is no hook to do that.
E.g. if you want to customize the drag transition-animation depending on mouse location.
I would propose to either call the cdkDragEnded as soon as the mouse is released (just before the animation) - or add another hook like "cdkDragWillEnd". (Similar as in iOS development, where you get a callback before and after the animation).
The text was updated successfully, but these errors were encountered: