Skip to content

Commit d775412

Browse files
committed
fix(cdk/drag-drop): incorrect type DragConstrainPosition
Fixes type DragConstrainPosition, which of сorrect configuration of CdkDrag is not possible when using in providers Fixes #30509
1 parent 3d7f271 commit d775412

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cdk/drag-drop/directives/config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ export type DragStartDelay = number | {touch: number; mouse: number};
1616
export type DragAxis = 'x' | 'y';
1717

1818
/** Function that can be used to constrain the position of a dragged element. */
19-
export type DragConstrainPosition = (point: Point, dragRef: DragRef) => Point;
19+
export type DragConstrainPosition = (
20+
userPointerPosition: Point,
21+
dragRef: DragRef,
22+
dimensions: DOMRect,
23+
pickupPositionInElement: Point,
24+
) => Point;
2025

2126
/** Possible orientations for a drop list. */
2227
export type DropListOrientation = 'horizontal' | 'vertical' | 'mixed';

0 commit comments

Comments
 (0)