Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not reuse graph from run() #32

Closed
coli opened this issue Mar 7, 2014 · 3 comments
Closed

Can not reuse graph from run() #32

coli opened this issue Mar 7, 2014 · 3 comments

Comments

@coli
Copy link

coli commented Mar 7, 2014

Open console and load http://jsfiddle.net/aHC42/2/

I'm trying to modify the layout graph that is returned from renderer.run(), and it fails with an exception at

Uncaught TypeError: undefined is not a function dagre-d3.js:2313
checkSupportedPrefRank dagre-d3.js:2313
(anonymous function) dagre-d3.js:2282
dfs dagre-d3.js:2273
exports.apply dagre-d3.js:2309
(anonymous function) dagre-d3.js:3019
run dagre-d3.js:2095
(anonymous function) dagre-d3.js:3019
run dagre-d3.js:1057
(anonymous function) dagre-d3.js:3019
runLayout dagre-d3.js:227
Renderer.run dagre-d3.js:178
draw (index):110

If I use the original graph then it works.

@coli
Copy link
Author

coli commented Mar 7, 2014

BTW: I'm trying to implement toggling of nodes, similar to a tree view like http://fiddle.jshell.net/86M45/3/show/ , and I'm realizing that the directed graph API make this quite hard to do...

@cpettitt
Copy link
Collaborator

cpettitt commented Mar 8, 2014

That is more or less expected. The output graph does not include the data from the input graph. It is fine to update the input graph and rerun the algorithm though.

@coli
Copy link
Author

coli commented Mar 10, 2014

K, that's what I'm doing now.

@coli coli closed this as completed Mar 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants