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
When using custom preview templates with *cdkDragPreview, the preview is always positioned next to the cursor. This behaviour is different to using the default preview where the preview is positioned relative the pickup location.
@crisbeto - Fair enough. I guess it makes more sense in cases where the preview size is known to be the same as the draggable element's. I opened a related feature request: #18177.
Feature Description
When using custom preview templates with *cdkDragPreview, the preview is always positioned next to the cursor. This behaviour is different to using the default preview where the preview is positioned relative the pickup location.
I had a look in the code and removing the if shorthand at https://github.com/angular/components/blob/master/src/cdk/drag-drop/drag-ref.ts#L753 solves this. Checking the
_getPointerPositionInElement
method I couldn't find any reason why it wouldn't work with custom preview templates.Use Case
This would be improve UX when using a custom preview template that has similar dimensions to the root element.
The text was updated successfully, but these errors were encountered: