sporritt/jsPlumb — pull request #41 by oasakfu (2013-05-13 06:39:58+00:00)
Title: Bezier curviness is now a factor of the distance between the endpoints.

Hi,

I've updated `Bezier._findControlPoint` to suit the style of my app, and I thought you might be interested in the change. The code is simpler now, but it does behave differently:
- Curviness scales up as the end points are moved further apart.
- `stub` is now used and represents a constant offset for the control point (does not scale with distance).
- `minorAnchar` has been removed. I found the behaviour that it caused (flipping) to be annoying. Was it introduced to try to make Bezier connectors always appear curved?

This gives consistently smooth connectors at any scale that always point in the direction specified in the endpoint parameters. These changes are not backwards-compatible, because I reused the curviness parameter. Previously good values for this were 150, etc; now it's usually better to have it in the range 0..1. `stub` is now similar to how `curviness` used to be.

Alex