d3 / d3-transition

Animated transitions for D3 selections.
https://d3js.org/d3-transition
ISC License
224 stars 65 forks source link

Any pending transition should cancel remove, not just same-named. #38

Closed mbostock closed 8 years ago

mbostock commented 8 years ago

It’s currently implemented as:

function remove() {
  var parent = this.parentNode;
  if (parent && !this[key].pending.length) parent.removeChild(this);
}

But what if this transition has a name? It seems like the removal should be cancelled if there is any pending transition on the element, not just if there is a pending transition of the same name.