function deleteNode(d){ var deletelinks = links.select(function(x) { return x['source'].id==d.id||x['target'].id==d.id?this:null; }) deletelinks.remove(); var deletenode = nodes.select(function(x){ return x.id==d.id?this:null; }) deletenode.remove(); } function highlightNode(current, currentD){ currentD.highlightFlag = true; current.select(".circles1").transition() .attr("r", function(d){return get_circle_r(d)}) .attr("fill", function(d){return get_circle_fill(d)}); }
标签:function,return,删除,D3,节点,null,id,select,fill From: https://www.cnblogs.com/carriexu/p/17106392.html