title: How to hide graph's branch in vis.js?
body: <p>I am able to display part of the graph in vis.js by clicking on the node <code>1205</code> with the following but cannot figure out how to make the expanded part disappear on a second click on the same node?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var nodes = new vis.DataSet([
    {id: 2696, label: "l"}, 
    {id: 1205, label: "l"}, 
    {id: 2697, label: "l"}
  ]);
  
  var edges = new vis.DataSet([
    {from: 2696, to: 2697}, 
    {from: 2696, to: 1205}
  ]);
  
  var container = document.getElementById('mynetwork');
  var data = {
    nodes: nodes,
    edges: edges
  };
  
  var network = new vis.Network(container, data, {});
  network.on("click", function(e) {
    tw_id = 1205;
    if (e.nodes[0] == tw_id) {
      sel_id = e.nodes[0];
      var node = nodes.get(e.nodes[0]);
      nodes.add([
        {id: 2021, label: "l"}, 
        {id: 2047, label: "l"}
      ]);
      edges.add([
        {from: 1205, to: 2021}, 
        {from: 1205, to: 2047}
      ]);
      nodes.update(node);
    }
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#mynetwork {
    width: 400px;
    height: 300px;
    border: 1px solid lightgray;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.17.0/vis.min.css" rel="stylesheet" /&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.17.0/vis.min.js"&gt;&lt;/script&gt;
  &lt;div id="mynetwork"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>