graph edges wont move to right position when toggle legend
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.0.2
### Reproduction link
[https://jsfiddle.net/w3fnsaLz/6/](https://jsfiddle.net/w3fnsaLz/6/)
### Steps to reproduce
toggle the legend to hide
toggle back
watch the edges and node position
if not reproduced
toggle the legend to hide again
and then toggle back
### What is expected?
the edges and nodes layout updated
### What is actually happening?
it is updated, but not in the right postion
---
if i change the source code in GraphView.js
```js
GraphView.prototype._startForceLayoutIteration = function (forceLayout, layoutAnimation) {
var self = this;
(function step() {
forceLayout.step(function (stopped) {
self.updateLayout(self._model);
(self._layouting = !stopped) && (layoutAnimation ? self._layoutTimeout = setTimeout(step, 16) : step());
(stopped) && (self._layoutTimeout = setTimeout(step, 16));
});
})();
};
```
it will jump to the right position, but i dont think its the best solution.
Contributor guide
Assessment
This issue has not been assessed yet.