Curved

extends:
Jump To: Members

A curved edge style draws edges between two nodes as a bezier curve.

More specifically, this edge uses a control point to dictate the curves of the line. By default, each control point's value is calculated automatically by using the "axis" parameter to determine the best strategy.

You can change the control point calculation by setting the controlPoint function on this edge style.

Examples:

This is the default way to construct a curved edge style display.template('edge').as(thinkmap.display.edgestyle.curved())
If you wish to use anchors other than the default (for example, a more vertical layout) : display.template('edge').as( thinkmap.display.edgestyle .curved() .axis('y') .anchorFrom(thinkmap.display.anchor.northSouth()) .anchorTo(thinkmap.display.anchor.northSouth()) );
If you wish to use your own control point functions display.template('edge').as( thinkmap.display.edgestyle .curved() .controlPoint(function(cp, p1, p2, edge, node){ cp.x = (p1.x + p2.x) / 2; cp.y = p1.y; }) );

Instance Methods

Defined in Curved: