apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.69k stars 19.62k forks source link

fix(graph): zooming a Force Graph with layoutAnimation false breaks edges #20517

Open sz-p opened 1 week ago

sz-p commented 1 week ago

Brief Information

This pull request is in the type of:

What does this PR do?

Fixed issues

20515

Details

Before: What was the problem?

image

After: How does it behave after the fixing?

下载

Document Info

One of the following should be checked.

Misc

ZRender Changes

Related test cases or examples to use the new APIs

N.A.

Others

Merging options

Other information

echarts-bot[bot] commented 1 week ago

Thanks for your contribution! The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

sz-p commented 1 week ago

I discovered the issue is in https://github.com/apache/echarts/blob/master/src/chart/graph/GraphView.ts#L281

it just update the links not both nodes and links.

It will be fixed when remove the update or update both nodes and links.

I'm not sure the update is necessary?

I have removed this update and It look work will.

If update both nodes and links the graph will have a large layout change when zoom happens