Version
5.4.3
Link to Minimal Reproduction
https://stackblitz.com/edit/stackblitz-echarttest?file=src%2Fmain.ts
Steps to Reproduce
Open project
click on "Toggle"
drag on nodes
video: https://www.awesomescreenshot.com/video/20041073?key=58f3ff3ad39082214c75241f612a52d3
Current Behavior
Nodes incorrectly restore their position on the second instance of echarts
Expected Behavior
Nodes and viewport must exactly match the original
Environment
- OS:Ubuntu 24.04
- Browser: Chome 114.0
- Framework: Angular 16
Any additional comments?
The problem is that I can't restore the exact state of the graph by the value of zoom, center and node coordinates
The nodes either move out or stretch, and if you apply a zoom other than 1, then no matter how you set the value of the nodes by dragging, they seem to be in an invisible bounding box
https://www.awesomescreenshot.com/video/20041073?key=58f3ff3ad39082214c75241f612a52d3
2条答案
按热度按时间chhqkbe11#
The Reproduction is definitely not Minimal.
Could you please describe the problem starting with this one ?
ercv8c1e2#
Here I tried to make a minimal reproduction.
https://codesandbox.io/s/simple-graph-forked-fml7wd?file=/index.js
The meaning is as follows - it is necessary to get its state from the first graph and transfer it to the second (node coordinates, scale and position of the viewport)
If you use the mouse to move the viewport or nodes, then the display on the two graphs begins to differ
https://www.awesomescreenshot.com/video/20093672?key=79126b30463eed8ba69bc3bbc927a9d4