Drag and drop, ability to hold element while drag
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
#### Please describe the feature you would like to request.
Ability to pass boolean value for hold element while moving. it is something like `dragStartThreshold`, but during dragging. (it will block to change transform3d values till we change hold value e.g `cdkDragHold = false`)
#### What is the use-case or motivation for this proposal?
for example, if a user drags an element past near the center of the page, we need to magnetize the element with center for 20px area, then we pass new input e.g. `cdkDragHold = true` and by that we want to hold dragging element till we change this value. I think this might be useful for another many cases, bcs it's quite hard for user to moving element exactly pixel in pixel in some cases, but we can help to do this programmatically.
#### Is there anything else we should know?
It a bit similar to `dragStartThreshold` from `DragRefConfig`.
Contributor guide
Research direction
Start by reading the existing DragRefConfig and dragStartThreshold behavior, then trace how cdkDrag updates transform3d values during dragging. Define how a hold input would interact with the requested magnetized 20px center area, and add coverage showing that movement pauses and resumes when the value changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100