angular / angular/components

Drag and drop, ability to hold element while drag

Aperta
#15,795 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area: cdk/drag-drop feature P5
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

#### 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`.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia leggendo il comportamento esistente di DragRefConfig e dragStartThreshold, quindi traccia il modo in cui cdkDrag aggiorna i valori di transform3d durante il trascinamento. Definisci come un input di mantenimento interagirebbe con l'area centrale magnetizzata di 20px richiesta e aggiungi una copertura che dimostri che il movimento viene messo in pausa e ripreso quando il valore cambia.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.