UNPKG
@plotly/d3
Version:
latest (3.8.2)
3.8.2
3.8.1
3.8.0
3.7.0
3.6.1
3.6.0
3.5.18
A JavaScript visualization library for HTML and SVG.
d3js.org
plotly/d3
@plotly/d3
/
src
/
transition
/
remove.js
10 lines
(8 loc)
•
238 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
"transition"
; d3_transitionPrototype.remove = function() {
var
ns =
this
.namespace;
return
this
.each(
"end.transition"
, function() {
var
p;
if
(
this
[ns].count <
2
&& (p =
this
.parentNode)) p.removeChild(
this
); }); };