-
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 inside drop list doesn't preserve transform
value
#22407
Comments
I don't think we ever had special handling for this so if it worked before, it was probably by accident. I definitely think that we should fix it, but #18145 isn't the way to go, because it only applies to drag items that are outside of a list. I think that the easiest workaround until we fix it on our end is to apply your
|
transform
value
@crisbeto , yeah, I ended up doing something similar. Thanks! |
@crisbeto , also, if you (or anyone) could give me some pointers, I would be interested in taking a shot at fixing it. |
We have some logic that tries to preserve the original `transform` of an element, but we only apply it while dragging. These changes expand the support to include elements inside a drop list, as well as the preview and placeholder. Fixes angular#22407.
We have some logic that tries to preserve the original `transform` of an element, but we only apply it while dragging. These changes expand the support to include elements inside a drop list, as well as the preview and placeholder. Fixes #22407.
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. |
What are you trying to do?
I am trying to absolutely position draggable elements inside a drop container using transform. Something like -
Before upgrading to cdk v9, this worked perfectly. However, after upgrading, it seems like the transform style is overwritten by the CDK.
What troubleshooting steps have you tried?
After some digging, it seems like this code is performing the reset.
I tried using
cdkDragFreeDragPosition
, but that only works in the absence of a drop container.It also seems like this PR, should fix the issue?
Is there any other recommended way of setting this?
What are you seeing that does not match your expectations?
Reproduction
N/A
Environment
The text was updated successfully, but these errors were encountered: