0

I have made an arbor layout with cytoscape using

layout{
     name:'arbor'
}

But as seen in arbor.js, the nodes are bouncing freely. It doesn't seem to happen in cytoscape layout. After loading in the browser, once it is rendered freely, after that it becomes an static one.

nyxem1
  • 179
  • 1
  • 4
  • 16

1 Answers1

0

The behaviour you describe is not expected or desired by default for the vast majority of users of the library, so I doubt this default behaviour will change.

You'll have to configure your layout options appropriately for what you want. The options do what's documented, so you just have to change the options related to ending the layout:

http://cytoscape.github.io/cytoscape.js/#layouts/arbor

cy.layout({ name: 'arbor', maxSimulationTime: Infinity, stableEnergy: function(){ return false; } });
maxkfranz
  • 11,896
  • 1
  • 27
  • 36
  • Math.Infinite doesn't seem to work. Is there any issue to type it directly there in layout – nyxem1 May 02 '14 at 19:21
  • It's a typo, and you'll have to use the proper value for infinite. The example is just to give you an idea of what to do -- not really to be a copy-paste full solution. You're almost certainly going to have to read through the docs and adjust other options to suit your graph anyway. – maxkfranz May 02 '14 at 19:31
  • i know that... thought its coming from cytoscape. Rather i tried putting 1.7976931348623157E+10308 value, which is almost treated as equivalent to infinite. But its not getting full fluid effect. – nyxem1 May 02 '14 at 19:35
  • Maybe you mean your `stepSize` is too high? Otherwise I don't understand what you mean by "fluid". – maxkfranz May 02 '14 at 19:42
  • i meant to say that if you drag a node in real arborjs layout the whole structure moves in a fluid manner and the nodes get a repulsion when brought together. This is not the case here. – nyxem1 May 02 '14 at 19:48
  • Would you like to create a ticket describing your desired behaviour and link it here? It sounds like you're looking for very specific behaviour and it may benefit from a simplified option that sets several others. – maxkfranz May 05 '14 at 19:26