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

is there an option to do some transition animation for expanding nodes? #31

Open
marina83 opened this issue Mar 4, 2014 · 2 comments
Open

Comments

@marina83
Copy link

marina83 commented Mar 4, 2014

Hi
i was wondering if there is an option to do some animation when clicking on node and expanding its children like in d3 tree http://bl.ocks.org/mbostock/4339083?

@cpettitt
Copy link
Collaborator

cpettitt commented Mar 5, 2014

It should be doable by enabling transitions (you can see them in the interactive demo):

// Custom transition function
function transition(selection) {
  return selection.transition().duration(500);
}

renderer.transition(transition);

Then if you add nodes / edges and re-run the layout they will transition into place.

@christianvoigt
Copy link

Hi, I was playing around with this as well and it works great. The only thing that is somewhat disorienting is that the nodes often switch their order after "maximizing" a node. It would be really nice, if they would keep it. Is there any way to achieve this?

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

3 participants