Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/cdk/drag-drop/directives/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ export type DragStartDelay = number | {touch: number; mouse: number};
export type DragAxis = 'x' | 'y';

/** Function that can be used to constrain the position of a dragged element. */
export type DragConstrainPosition = (point: Point, dragRef: DragRef) => Point;
export type DragConstrainPosition = (
userPointerPosition: Point,
dragRef: DragRef,
dimensions: DOMRect,
pickupPositionInElement: Point,
) => Point;

/** Possible orientations for a drop list. */
export type DropListOrientation = 'horizontal' | 'vertical' | 'mixed';
Expand Down
2 changes: 1 addition & 1 deletion tools/public_api_guard/cdk/drag-drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export function copyArrayItem<T = any>(currentArray: T[], targetArray: T[], curr
export type DragAxis = 'x' | 'y';

// @public
export type DragConstrainPosition = (point: Point, dragRef: DragRef) => Point;
export type DragConstrainPosition = (userPointerPosition: Point, dragRef: DragRef, dimensions: DOMRect, pickupPositionInElement: Point) => Point;

// @public
export class DragDrop {
Expand Down
Loading