UNPKG

doevisualizations

Version:

Data Visualization Library based on RequireJS and D3.js (v4+)

12 lines (10 loc) 284 B
function removeFunction(id) { return function() { var parent = this.parentNode; for (var i in this.__transition) if (+i !== id) return; if (parent) parent.removeChild(this); }; } export default function() { return this.on("end.remove", removeFunction(this._id)); }