getPathStringWithTwoBends
This lib will provide access to the following function.
- getPathStringWithTwoBends
This function has been overloaded to handle two different sets of inputs.
Passing 4 arguments assumes you will be passing two pints in (x1, y1) form
Passing 5 arguments assumes you will be passing the starting point, and then bend deltas for y1, x1, and y2
var d = {x1:0, y1:0, x2:10, y2:10};
var path = svg.append('path')
.attr('style', 'fill:none;stroke:#90C4E3;stroke-miterlimit:10;')
.attr('d', getPathStringWithTwoBends(d.x1, d.y1, d.x2, d.y2) );
var d = {x1:200, y1:100, x2:100, y2:100};
var bendDeltas = getDeltas(d)
var path = svg.append('path')
.attr('style', 'fill:none;stroke:#90C4E3;stroke-miterlimit:10;')
.attr('d', getPathStringWithTwoBends(d.x1, d.x2, bendDeltas.dy1, bendDeltas.dx1, bendDeltas.dy2));