Small patch to allow the user to specify the center of gravity in the force directed graph #817

Closed
wants to merge 1 commit into
from

Conversation

2 participants
@scholarsmate

This small update has certainly been useful on our project and thought it might be useful for others as well. The patch is very small and backwards compatibility is maintained. I did not update the minimized version.

Hope it helps!

@mbostock

This comment has been minimized.

Show comment Hide comment
@mbostock

mbostock Jan 23, 2013

Owner

Thanks for the pull request. Currently, the layout’s size directly determines the gravitational center, and that’s pretty much it’s only purpose (aside from initializing node positions). Thus I don’t see a compelling need to add a separate gravitational center, especially since you can also apply a transform to the G element that contains the force layout if you like.

Owner

mbostock commented Jan 23, 2013

Thanks for the pull request. Currently, the layout’s size directly determines the gravitational center, and that’s pretty much it’s only purpose (aside from initializing node positions). Thus I don’t see a compelling need to add a separate gravitational center, especially since you can also apply a transform to the G element that contains the force layout if you like.

@mbostock mbostock closed this Jan 23, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment