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

simulation.size() #54

Closed
ramijarrar opened this issue Aug 17, 2016 · 1 comment
Closed

simulation.size() #54

ramijarrar opened this issue Aug 17, 2016 · 1 comment

Comments

@ramijarrar
Copy link

We used this function to handle window resize in v3 (so the graph shifts into view)

I had a look through the CHANGES document but couldn't find any information relating to why this was removed/how to achieve something similar in v4.

@mbostock
Copy link
Member

The only effect that the old force layout.size had was to set the attraction point for the "gravity" force to be [width / 2, height / 2]. This has been replaced by the positioning forces d3.forceX and d3.forceY, and you can set the focus coordinates of these forces using x.x and y.y respectively as documented in the README.

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

No branches or pull requests

2 participants