title: Force Network: How to set initial position for select nodes?
body: <p>I have a simple force network graph of four nodes as an example, here:</p>
  
  <p><a href="https://jsfiddle.net/NovasTaylor/o1qesn6k/" rel="nofollow noreferrer">https://jsfiddle.net/NovasTaylor/o1qesn6k/</a></p>
  
  <p>I would like to set the initial position of node "A" using its accompanying data so the node is initially fixed at point (265,143). If I were to double-click that node it would return to being d.fixed=FALSE and the usual forces apply.</p>
  
  <p>From my research here on Stackoverflow I know I need to set the inital .x and .y values as per Bostock's suggestion:
  [<a href="https://stackoverflow.com/questions/10392505/fix-node-position-in-d3-force-directed-layout][1]">Fix Node Position in D3 Force-Directed Layout</a></p>
  
  <p>But I do not quite grasp where and how to do this. I have tried the following code, which I may not have placed in the right sequence. It appears to be the same as having .x and .y in the source data...which also did not work. </p>
  
  <pre><code>for (var i=0,  tot=dataset.nodes.length; i &lt; tot; i++) {
      if (dataset.nodes[i].fix_x &gt; 0) {
          dataset.nodes[i].x = dataset.nodes[i].fix_x
          dataset.nodes[i].y = dataset.nodes[i].fix_y
      }
  }
  </code></pre>
  
  <p>Your advice would be very much appreciated!</p>
  
  <p>Tim </p>