angular / angular/components

Allow Drag and Drop from/to arbitrary areas

未关闭
#13,987 2 条评论 22 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

area: cdk/drag-drop feature P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

Bug, feature request, or proposal:

Dragging and dropping in a cdkDropList is nice, but we need the ability to set an element as a cdkDrag element, and be able to drag that element onto an arbitrary drop zone/target. Currently, there is no way to know if a cdkDrag that is not part of a drop list is dragged - there aren't any "drag start", "drag end/dropped" events.

What is the expected behavior?

Be able to be notified when a cdkDrag element that is not within a drop list is dragged and dropped.

What is the current behavior?

Not the above.

What is the use-case or motivation for changing an existing behavior?

Be able to drag elements from a list / grid onto a target area, not necessarily moving the item, but to at least be notified when it is dropped into the target, in order to do something (play a sound or animation, etc.)

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 7.0.2
Material 7.0.2
All browsers.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先查看 Angular CDK 的拖放 API,以及针对独立 cdkDrag 元素所描述的行为。当拖放列表外的 cdkDrag 能够在拖动开始时以及被放置到任意目标上时通知消费者,工作就完成了。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。