Skip to content

Instantly share code, notes, and snippets.

@mbostock
Created August 25, 2011 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbostock/1171371 to your computer and use it in GitHub Desktop.
Save mbostock/1171371 to your computer and use it in GitHub Desktop.
Transition End
d3_transitionPrototype.end = function() {
var subgroups = [],
subgroup,
subnode,
node;
for (var j = -1, m = this.length; ++j < m;) {
subgroups.push(subgroup = []);
for (var group = this[j], i = -1, n = group.length; ++i < n;) {
if (node = group[i]) {
subgroup.push({node: node, delay: node.delay + node.duration, duration: node.duration});
} else {
subgroup.push(null);
}
}
}
return d3_transition(subgroups, this.id).ease(this.ease());
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment