In JGraphX, is the radius handled correctly in mxCircleLayout? -


in using mxcirclelayout, 1 can specify radius. seems, however, radius affects graph radius greater default based on graph bounds. in looking @ source code (jgraphx 3.3.1.1) mxcirclelayout, line 230 has:

        double r = math.max(vertexcount * max / math.pi, radius); 

where "r" used radius circle layout. shouldn't be

        double r = math.min(vertexcount * max / math.pi, radius); 

if want have smaller radius? perhaps i'm misunderstanding "radius" means, circle ought have natural meaning. , changing line gives me (smaller) circle want.

the max used in order make sure vertices not overlap. see comment @ start of execute statement:

    // moves vertices build circle. makes sure     // radius large enough vertices not     // overlap 

however, seem use bounds of largest vertex, not useful if vertices have different sizes maximum larger average.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -