Skip to content

Commit

Permalink
Merge branch 'force-tick' into v2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Feb 22, 2012
2 parents 0aed1e4 + 56818fd commit 522e269
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions d3.v2.js
Expand Up @@ -5129,7 +5129,7 @@ d3.layout.force = function() {
};
}

function tick() {
force.tick = function() {
// simulated annealing, basically
if ((alpha *= .99) < .005) return true;

Expand Down Expand Up @@ -5197,7 +5197,7 @@ d3.layout.force = function() {
}

event.tick({type: "tick", alpha: alpha});
}
};

force.nodes = function(x) {
if (!arguments.length) return nodes;
Expand Down Expand Up @@ -5333,7 +5333,7 @@ d3.layout.force = function() {

force.resume = function() {
alpha = .1;
d3.timer(tick);
d3.timer(force.tick);
return force;
};

Expand Down

0 comments on commit 522e269

Please sign in to comment.