title: d3.js drawing network with immobilizing layouts
body: <p>I`m currently working on with visualizing structure of batch scripts written by my predecessor which is simply repeating SELECT from somewhere and INSERT to somewhere. I try to use tree functions but it was not as flexible to use when I want same name in same index of JSON to be recognized as same node.</p>
  
  <p>So I decided using force layout functionality ,and got nearly done with some help of googling. However, while I can map the same group of database or scripts in same area for initializing part but somehow force.on("tick", function() ~~ re-calculate the distance between each nodes then it became really messy.But without this ,it won't show the links between nodes.</p>
  
  <p>Does anyone know how to immobilize the layout while links are re-calculated using the JSON.
  My code is like this:</p>
  
  <pre><code>          node.append("circle")
                .attr("cx", function(d) { return d.group*70; })
                .attr("cy", function(d) { return d.index*10; })
                .attr("r", 10)
                .attr("fill", function(d) {
                     return "rgb(" + (255 - d.group*20) + ",0,"+(d.group*50) + ")";
                });
  
            node.append("text")
                .attr("dx", function(d){return d.group*70;})
                .attr("dy", function(d){return d.index*10;})
                .text(function(d) { return d.name });
            force.on("tick", function() {
                alert(debugPrint(this));
                link.attr("x1", function(d) { return d.source.x; })
                    .attr("y1", function(d) { return d.source.y; })
                    .attr("x2", function(d) { return d.target.x; })
                    .attr("y2", function(d) { return d.target.y; });
  
                node.attr("transform", function(d) {
                    return "translate(" + d.x + "," + d.y + ")";
                });
                //node.attr("transform", function(d) { return "translate(0)"; }); });
            });
  </code></pre>