move code around

alfred-data
Nils Schneider 2012-06-06 03:28:35 +02:00
parent 1effc65b00
commit b5c8f9b6bc
1 changed files with 2 additions and 3 deletions

View File

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