Skip to content

Commit

Permalink
Rename for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Apr 26, 2016
1 parent e532b18 commit e88cd9e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/simulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function(nodes) {
alphaMin = 0.0001,
alphaDecay = -0.02,
drag = 0.5,
force = map(),
forces = map(),
ticker = timer(tick),
event = dispatch("tick", "end");

Expand All @@ -42,7 +42,7 @@ export default function(nodes) {
return;
}

force.each(function(force) {
forces.each(function(force) {
force(alpha);
});

Expand Down Expand Up @@ -78,7 +78,7 @@ export default function(nodes) {
tick: tick,

nodes: function(_) {
return arguments.length ? (nodes = _, initializeNodes(), force.each(initializeForce), simulation) : nodes;
return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes;
},

alphaMin: function(_) {
Expand All @@ -94,7 +94,7 @@ export default function(nodes) {
},

force: function(name, _) {
return arguments.length > 1 ? ((_ == null ? force.remove(name) : force.set(name, initializeForce(_))), simulation) : force.get(name);
return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);
},

on: function(name, _) {
Expand Down

0 comments on commit e88cd9e

Please sign in to comment.