title: Fix Node Position in D3 Force Directed Layout
body: <p>I want some of the nodes in my force-directed layout to ignore all forces and stay in fixed positions based on an attribute of the node, while still being able to be dragged and exert repulsion on other nodes and maintain their link lines. </p>
  
  <p>I thought it would be as simple as this:</p>
  
  <pre><code>force.on("tick", function() {
      vis.selectAll("g.node")
          .attr("transform", function(d) {
              return (d.someAttribute == true) ?
                 "translate(" + d.xcoordFromAttribute + "," + d.ycoordFromAttribute +")" :
                 "translate(" + d.x + "," + d.y + ")"
          });
    });
  </code></pre>
  
  <p>I have also tried to manually set the node's x and y attributes each tick, but then the links continue to float out to where the node would be if it was affected by the force.</p>
  
  <p>Obviously I have a basic misunderstanding of how this is supposed to work. How can I fix nodes in a position, while keeping links and still allowing for them to be draggable?</p>