Allow to create cdkDragPreview from the drag drop service
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
#### Feature Description
Allow the creation of cdkDragPreview elements outside of a cdkDropList.
#### Use Case
I would like to be able to drag an element Base from a zone A to a zone B, with a preview without losing the place Base was in.
On the event `dragstart` a call to DragDrop (for example) would allow me to duplicate Base or another template element passed to the creation method.
That element Preview would be draggable and would follow the cursor. Base would act as a cdkDragPlaceholder and preview as a cdkDragPreview.
On the event `drop`, I would handle myself what needs to be done. In my case, I only want to get the position of the event, which I can easily do as it's native.
Ideally, we would keep a reference to the element Base to be able to delete it at that point.
I can see difficulties on what to do of Preview or Base by default here. Should Base disappear and Preview stay at the end of the body? Should Preview get nested somewhere where it got dropped? I have no answers here.
I see this as a follow-up to #14261, in that it is a purely cdk request for all DOM nodes.
Thank you
コントリビューションガイド
調査の方向性
まず、issue で説明されている drag-drop service と、cdkDragPreview、cdkDragPlaceholder、cdkDropList、dragstart、drop のエントリーポイントを読みます。cdkDropList の外部における Base と Preview の想定されるライフサイクルと所有関係を、drop 後に何が起こるべきかも含めて明らかにします。完了条件は、指定されたユースケースについて API の動作とクリーンアップのルールが明確に定義され、サポートされていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100