dagre布局中使用graph.updateLayout()方法切换controlPoints无效
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
### 问题描述
dagre布局,连线是polyline类型,通过graph.updateLayout()方法切换controlPoints的值,只会将controlPoints切换成true和false,如下:
graph.updateLayout({
controlPoints: true,
});
调用完updateLayout方法后连线的控制点没有改变,希望看到有控制点和无控制点两种情况,如下图:
### 重现链接
无
### 重现步骤
无
### 预期行为
希望调用graph.updateLayout()方法后可立即切换连线样式,不希望重新创建图的实例来实现目标
### 平台
- 操作系统: [macOS]
- 网页浏览器: [Google Chrome]
- G6 版本: [4.8.24]
### 屏幕截图或视频(可选)
_No response_
### 补充说明(可选)
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
Begin by reproducing the dagre layout case in G6 4.8.24 with a polyline edge, then call graph.updateLayout({ controlPoints: true }) and the corresponding false setting. Trace the graph.updateLayout entry point and dagre layout handling; done means the edge visibly switches between control points and no control points without recreating the graph instance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100