title: How to stop infinite cola layout manually?
body: <p>I had used infinite option in cola layout to draw the nodes and their connections. I was trying to add manual stop function to this when all the nodes in the graph get well settled. But I couldn't find a way to do this.<br>
  So, how can I manually stop the cola layout?<br>
  I cannot use max simulation time option as the number of nodes in the graph and their connections can vary and so deciding this time is not possible. </p>
  
  <p>As a hack, I am using currently like</p>
  
  <pre><code>var simulationStopTimer = setInterval(function (){  
       if (simulationStopNow){  
         options.infinite = false;
         adaptor.stop();  
         clearInterval(simulationStopTimer);             
       }          
    }, 10000);
  </code></pre>
  
  <p>So, i am using a timer every 10 seconds to check whether the user has clicked a button to stop the layout. Is there is any better way?</p>