[Bug]: create-edge.ts mode.translateNodeTo该方法参数应该转化为canvas坐标。
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug / 问题描述
这里应该将浏览器坐标转换为canvas坐标
```javascript
model.translateNodeTo(ASSIST_NODE_ID,[event.client.x,event.client.y]);
//fixed
const [cx,cy] =graph.getCanvasByClient(,[event.client.x,event.client.y]);
model.translateNodeTo(ASSIST_NODE_ID,[cx,cy]);
```
### Reproduction link / 复现链接
_No response_
### Steps to Reproduce the Bug or Issue / 重现步骤
_No response_
### Version / 版本
Please select / 请选择
### OS / 操作系统
- [x] macOS
- [x] Windows
- [x] Linux
- [ ] Others / 其他
### Browser / 浏览器
- [x] Chrome
- [x] Edge
- [x] Firefox
- [ ] Safari (Limited support / 有限支持)
- [ ] IE (Nonsupport / 不支持)
- [ ] Others / 其他
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in create-edge.ts and inspect the mode.translateNodeTo call shown in the issue, along with the graph coordinate-conversion API. Confirm whether the event values are browser coordinates and whether they must be converted before moving ASSIST_NODE_ID. Done means the node movement uses canvas coordinates and the existing behavior remains correct across the listed browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100