apache / apache/echarts

[Bug] Zooming a Force Graph with layoutAnimation false breaks edges

Open
#20,515 1 comment 0 reactions 0 assignees View on GitHub
bug en pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.5.1

### Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=graph-force&code=LYTwwgFghgTgLgOgM4QPYHcAyqoBMCWAdgOYAUAlANwBQAJAsQKZykBKA8uwCoD6ACgEEuACQAEAalEByAPS4ocKDKhIkzOQqUAbRkgC0wfGphQARjqQIAVklSEpAGlEAzAK6EAxnHx3RpYiYADhDkogDe1KKioJCwiBD4uIzYeERkVJGiAVDBCISoSZbOqDAAolAeEKRunt6-pPlJoRFRUY2MyCDApqhaAMr4AF6MogC8ogCsNFEAvhlRqIF1hGPhmVHecDoAXGutrXCMAB5wu1KYuqIAskaMJua6juutSK6mhydnACKMzlCuWjgoi0UBAqFccCe-w2izOPTgcFQwCh0J0zlO0hg-GIEEhzxmDmeiN63kCuzCBOeOiYhFwuwA2s8oi1oVEZDJRGodF5GLgrgVGGckGkdCjWfJFLtsrkPApGMQSvhdAhgDlqu4vD4VqQoM0mdCYMxXDAVlA8lBgIxpqzRHN9TNngBdQn7YxKpAM_Us1mEC2C6QXJDXW73Cxi6FwECBf1SaUQcP7EFgiFnYowDyMBOtCVQKVBCB5AVIF02rREADWHqy-YQZcIlZLrNlhwVWN0eZyBeb8sVukbBpwwF2cBgrkY_cTZkYWnJ-v2gVQwuWZyxOLxNttE9aaYzs43UUNgQBwrsuwAjAAGC9byfJuACQj4VXLlxQLRqG-2-1OzIza0xaB4GQZh2CWLVSEWZYMjmSggA

### Steps to Reproduce

1. Go to the sample graph-force example
2. Add layoutAnimation: false to the force settings
3. Zoom in the graph to get the result below:

![image](https://github.com/user-attachments/assets/d7634a37-bed8-4c84-9ee8-2939ac6e6696)

### Current Behavior

Zoom in the example, and see how the edges reset to some initial layout, that doesn't correspond with the edges.

### Expected Behavior

We would expect the edges to zoom correctly.

### Environment

```markdown
tested on Chrome and Firefox.
```

### Any additional comments?
This is the example used:
`https://echarts.apache.org/examples/en/editor.html?c=graph-force`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.