2016年4月16日土曜日

d3で子のHTMLの子エレメントとSVGの子エレメントを削除する方法はちょっと違う

HTMLの要素の場合:
d3.select("div.parent").html("");

SVGの要素の場合:
d3.select("g.parent").selectAll("*").remove();


http://stackoverflow.com/questions/14422198/how-do-i-remove-all-children-elements-from-a-node-and-them-apply-them-again-with

0 件のコメント:

コメントを投稿