swimlane / ngx-graph

Graph visualization library for angular

Home Page:https://swimlane.github.io/ngx-graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a state that will be called after the graph is rendered (updated)

iLunts opened this issue · comments

commented

Is your feature request related to a problem? Please describe.
There is still no way to get the state when the graph has been updated.
This makes it difficult to work with large graphs when you need to use panning for nodes.

Describe the solution you'd like
We need to add a state that will be called when all graphs + links + labels are fully rendered

Describe alternatives you've considered
We have active PR for solved this feature.

Additional context
@marjan-georgiev could you approve my proposal with a change.
Thx.

Pan to node doesn't work if called before graph finishes updating, which is not easily controllable due to being done in animationFrame - this PR helps solve this problem.

Something like a "rerendered" observeable would nice. I know its difficult to determine, when the graph has been finished rendering, so just an "updated" observeable would already be enough and very helpful.

Something like a "rerendered" observeable would nice. I know its difficult to determine, when the graph has been finished rendering, so just an "updated" observeable would already be enough and very helpful.

https://github.com/swimlane/ngx-graph/pull/448/files not sure if this solves your issue, it does fix my panning issue

I think I have a related issue. When using the center$ and zoomToFit$ inputs it seems to do these before the graph has finished rendering so the graph appears outside the view port.

any news on that?