autoResize 为 true 时,修改 edge 的颜色, 也会导致 manhattan 路由重绘
- Dominant language
- TypeScript
- Stars
- 6.7k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
### 问题描述
autoResize 为 true 时,修改 edge 的颜色, 也会导致 manhattan 路由重绘。
### 重现链接
https://x6.antv.antgroup.com/zh/examples/edge/router/#manhattan
### 重现步骤
```
const graph = new Graph({
container: document.getElementById('container'),
grid: true,
autoResize: true,
})
graph.on('edge:mouseenter', ({ edge }) => {
edge.prop('attrs/line/stroke', 'blue')
})
graph.on('edge:mouseleave', ({ edge }) => {
edge.prop('attrs/line/stroke', 'red')
})
```
### 预期行为
修改颜色,为什么与 路由 计算有关系?
### 平台
- 操作系统: [macOS, Windows, Linux, React Native ...]
- 网页浏览器: [Google Chrome, Safari, Firefox ...]
- X6 版本: [2.11.1 ...]
### 屏幕截图或视频(可选)

### 补充说明(可选)
简单的 hover 修改颜色,导致大图画布因为 manhattan 重绘,性能卡顿
Contributor guide
Research direction
Start with the Manhattan router example at the provided reproduction link and reproduce the issue using the autoResize configuration and edge hover color updates shown in the report. Trace the edge property update into Manhattan route recalculation and verify that changing only the edge color no longer redraws the route or causes canvas-wide performance degradation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100