-
Notifications
You must be signed in to change notification settings - Fork 19.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix:node self pointed -add cubicBezierCurve #15405
base: next
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
Please do not commit any change in |
@HCLacids Please don't delete the distribution files |
Can you describe the change in more detail and add the result screenshot. |
…2) Add test case `test/graph-self-loop.html`. (3) Remove some necessary code.
I have made a "draggable" test case to cover scenarios as much as possible. Functional defects summary
A PR-fix: HCLacids#1 to fix this PRThis PR-fix fixed the issue Before that PR-fix: https://echarts-try.surge.sh/graph-self-loop-old/graph-self-loop.html About curvenessAt present, the curveness can be controlled by two ways: series: {
type: 'graph',
lineStyle: {
curveness: 0.5
}
} or on some certain edges: series: {
type: 'graph',
edges: [{
source: 1,
target: 4,
lineStyle: {
curveness: 0.7
}
}, {
source: 1
target: 4
}]
} When const curveness = zrUtil.retrieve3(
edge.getModel<GraphEdgeItemOption>().get(['lineStyle', 'curveness']),
-getCurvenessForEdge(edge, seriesModel, index, true),
0
);
emphasis: {
focus: 'adjacency'
}, But I think we do not need to support @HCLacids Could the PR-fix be approved ? Any issue can be discussed. |
Fix and enhance graph self-loop layout.
So how do you use it? |
When will it be updated? |
Brief Information
This pull request is in the type of:
What does this PR do?
Fix the rendering of the edge that the target and the source is the same.
![image](https://user-images.githubusercontent.com/55933745/128731794-505a4ae0-5f16-44a5-8fb8-b0504199abd0.png)
![image](https://user-images.githubusercontent.com/55933745/128731796-53b7b536-ab3a-4241-8a50-c76d359a9b61.png)
![image](https://user-images.githubusercontent.com/55933745/128731795-7191cbc1-1671-44ed-905b-4e29f94a223d.png)
Fixed issues
Details
Before: What was the problem?
When the node has the self-loop-edge, it will render only one point in the previous condition that the algorithm only adapt to the quadratic bezierCurve.
After: How is it fixed in this PR?
Now the rendering method contians the cubic bezierCurve to paint the self-loop-edge.
Misc
Related test cases or examples to use the new APIs
NA.
Others
Merging options
Other information