DragService: allow a custom cursor for component drags
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 77/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
从内置的组件拖动路径入手,查看 src/services/drag/DragService.ts 和 packages/graph/src/services/drag/DragService.ts,issue 中指出这些位置直接提供了 grabbing。将这些路径与现有的 startDrag({…}, {cursor}) 选项进行比较。完成标准是:标准组件拖动可以选择活动光标,默认使用 grabbing,并在结束或取消后恢复自动选择光标。
由索引模型根据 Issue 内容生成。
描述
Use case
A canvas component represents a draggable handle for an orthogonal edge segment. A vertical segment moves horizontally, so it should show ew-resize throughout the gesture. The corresponding cursor for a horizontal segment is ns-resize.
Reproduction
- Use a custom
GraphComponentwithisDraggable()returningtrue, a hover cursor ofew-resize, and the standardhandleDragStart/handleDragcallbacks. - Hover the handle, press it, then move far enough for the component drag to begin.
- The cursor switches to
grabbingfor the active drag.
Expected behavior
Allow the component that initiates a standard component drag to opt into its own active drag cursor. Keep grabbing as the default. The active cursor may differ from the hover cursor. After the drag ends or is cancelled, return to automatic cursor selection.
startDrag({…}, {cursor}) already supports a cursor for custom operations. The built-in component path supplies "grabbing" directly in main and v2.
- 主要语言
- TypeScript
- 星标
- 145
- 派生
- 12
- 平均合并
- 1 天 14 小时
- 30 天内合并 PR
- 43
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
gravity-ui/graph 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
gravity-ui/graph#457 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
gravity-ui/graph#456 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
gravity-ui/graph#431 ·
维护者通常 1 天内回复
-
proposal
难度 5/5 一周以上 新手友好度 25/100
gravity-ui/graph#416 ·
维护者通常 1 天内回复
-
Graph root is not a containing block for absolutely positioned layers可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
gravity-ui/graph#414 ·
维护者通常 1 天内回复
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
难度 2/5 1-3 小时 新手友好度 68/100
openclaw/openclaw#199885 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
-
feature needs-triage
难度 2/5 1-3 小时 新手友好度 78/100
BoardGamesEmpire/board-games-empire-backend#1306 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100
sequant-io/sequant#1689 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 80/100