create-edge 在自定义 react-node下边创建方向异常
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
## 问题描述
在使用`create-edge` 行为时,边创建功能在内置 `rect` 节点类型下正常运行,但在自定义 `react-node` 类型下失效。具体表现为:
- **使用 `rect` 节点**:点击一个节点可开始绘制临时边,点击另一个节点完成边创建。
- **使用 `react-node` 节点**:点击节点,鼠标放置另一个节点上。 生成的边不在另一个节点上而是在相反的方向。
问题似乎与 `react-node` 和 `create-edge` 行为的兼容性有关。
截图:
- **使用 `rect` 正常工作**:
- **使用 `react-node` 失效**: 
## 复现链接
https://codesandbox.io/p/sandbox/determined-leftpad-7xclcf?file=%2Findex.tsx
## 期望行为
react自定义节点应与官方节点类型效果相同。
## 环境信息
- **G6 版本**: 5.0.48
- **操作系统**: Windows
- **浏览器**: Chrome(版本 126.0.6478.127)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked CodeSandbox reproduction and compare create-edge behavior using rect and custom react-node types. Trace the interaction from selecting the first node to placing the pointer over the second node. Done means the edge is created on the target react-node in the same direction as with rect nodes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100