cytoscape.js - How to layout breadthfirst with compound nodes in Cytoscape? -


i'm modifying breadthfirst example on cytoscape site (the 1 cat @ top). when create new "predators" node , put cat , dog nodes in it, change edge goes cat bird go predators bird, layout gets messed up.

how can use compound nodes breadthfirst, or there layout should using? don't want fancy, want compound nodes follow same rules normal node follows.

i understand want simple, problem compound graphs more complex ordinary graphs.

a compound node not have independent dimensions: http://js.cytoscape.org/#notation/compound-nodes

a layout has take account , have generic, customisable algorithm placing children such constraints both children , parents satisfied.

this doesn't fit layouts, , layouts marked explicit compound support give results you're looking for. ordinary layouts ignore compound nodes.

typically, force-directed (physics simulation) layouts work best compound graphs -- cola or cose bilkent. tree-like layouts don't. there many cases satisfying layout rules compound graphs impossible.

you can try cola directionality constraint make result tree-like. or can write own layout using api if compound graphs simple enough , can make enough assumptions topology of graphs.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -