move code around

This commit is contained in:
Nils Schneider 2012-06-06 03:28:35 +02:00
parent 1effc65b00
commit b5c8f9b6bc

View file

@ -129,6 +129,8 @@ var force = d3.layout.force()
.friction(0.75)
.theta(0.1)
.size([w, h])
.linkDistance(function (d) { return d.distance; })
.linkStrength(function (d) { return d.strength; })
force.on("tick", function() {
var size = force.size()
@ -175,9 +177,6 @@ force.on("tick", function() {
var data
d3.json("nodes.json", function(json) {
force.linkDistance(function (d) { return d.distance; })
.linkStrength(function (d) { return d.strength; })
json.links.forEach(function(d) {
var node, other