mxCircleLayout

Extends mxGraphLayout to implement a circluar layout for a given radius.  The vertices do not need to be connected for this layout to work and all connections between vertices are not taken into account.

Example

var layout = new mxCircleLayout(graph);
layout.execute(graph.getDefaultParent());
Summary
mxCircleLayoutExtends mxGraphLayout to implement a circluar layout for a given radius.
Functions
mxCircleLayoutConstructs a new circular layout for the specified radius.
Variables
radiusInteger specifying the size of the radius.
moveCircleBoolean specifying if the circle should be moved to the top, left corner specified by x0 and y0.
x0Integer specifying the left coordinate of the circle.
y0Integer specifying the top coordinate of the circle.
resetEdgesSpecifies if all edge points of traversed edges should be removed.
disableEdgeStyleSpecifies if the STYLE_NOEDGESTYLE flag should be set on edges that are modified by the result.
Functions
executeImplements mxGraphLayout.execute.
getRadiusReturns the radius to be used for the given vertex count.
circleExecutes the circular layout for the specified array of vertices and the given radius.

Functions

mxCircleLayout

function mxCircleLayout(graph,
radius)

Constructs a new circular layout for the specified radius.

Arguments

graphmxGraph that contains the cells.
radiusOptional radius as an int.  Default is 100.

Variables

radius

mxCircleLayout.prototype.radius

Integer specifying the size of the radius.  Default is 100.

moveCircle

mxCircleLayout.prototype.moveCircle

Boolean specifying if the circle should be moved to the top, left corner specified by x0 and y0.  Default is false.

x0

mxCircleLayout.prototype.x0

Integer specifying the left coordinate of the circle.  Default is 0.

y0

mxCircleLayout.prototype.y0

Integer specifying the top coordinate of the circle.  Default is 0.

resetEdges

mxCircleLayout.prototype.resetEdges

Specifies if all edge points of traversed edges should be removed.  Default is true.

disableEdgeStyle

mxCircleLayout.prototype.disableEdgeStyle

Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are modified by the result.  Default is true.

Functions

execute

mxCircleLayout.prototype.execute = function(parent)

Implements mxGraphLayout.execute.

getRadius

mxCircleLayout.prototype.getRadius = function(count,
max)

Returns the radius to be used for the given vertex count.  Max is the maximum width or height of all vertices in the layout.

circle

mxCircleLayout.prototype.circle = function(vertices,
r,
left,
top)

Executes the circular layout for the specified array of vertices and the given radius.  This is called from execute.

Base class for all layout algorithms in mxGraph.
function mxCircleLayout(graph,
radius)
Constructs a new circular layout for the specified radius.
mxCircleLayout.prototype.radius
Integer specifying the size of the radius.
mxCircleLayout.prototype.moveCircle
Boolean specifying if the circle should be moved to the top, left corner specified by x0 and y0.
mxCircleLayout.prototype.x0
Integer specifying the left coordinate of the circle.
mxCircleLayout.prototype.y0
Integer specifying the top coordinate of the circle.
mxCircleLayout.prototype.resetEdges
Specifies if all edge points of traversed edges should be removed.
mxCircleLayout.prototype.disableEdgeStyle
Specifies if the STYLE_NOEDGESTYLE flag should be set on edges that are modified by the result.
mxCircleLayout.prototype.execute = function(parent)
Implements mxGraphLayout.execute.
mxGraphLayout.prototype.execute = function(parent)
Executes the layout algorithm for the children of the given parent.
mxCircleLayout.prototype.getRadius = function(count,
max)
Returns the radius to be used for the given vertex count.
mxCircleLayout.prototype.circle = function(vertices,
r,
left,
top)
Executes the circular layout for the specified array of vertices and the given radius.
Extends mxEventSource to implement a graph component for the browser.
Close