title: Draw SVG path on top of tree. Cannot update path
body: <p>I am drwaing D3 collapsive tree as <a href="http://bl.ocks.org/d3noob/8375092" rel="nofollow">here</a>
  and want to draw some path between nodes. The problem is that when the tree branch is collapsed, old path is not removed. Similar solution is <a href="https://stackoverflow.com/questions/22621865/how-to-update-an-svg-path-with-d3-js#">here</a> but I do something wrong. Could you please advise how I should update SVG path?</p>
  
  <p>Code for init, update path:</p>
  
  <pre><code> var path = svg.selectAll('path.sce').data(nodes);
    path.attr('d', lineFunction(nodes))
        .style('stroke-width', 2)
        .style('stroke', 'black')
        .attr('class', 'arrow')
        .attr('fill', 'none')
        .attr('marker-end', 'url(#arrow)');
  
    path.enter().append('svg:path').attr('d', lineFunction(nodes))
        .style('stroke-width', 2)
        .style('stroke', 'black')
        .attr('class', 'arrow')
        .attr('fill', 'none')
        .attr('marker-end', 'url(#arrow)');
  
    path.exit().remove();
  </code></pre>
  
  <p>Full code - <a href="http://jsfiddle.net/hhaqvwtq/2/" rel="nofollow">jsfiddle</a></p>