INNER CODE UNIT · JavaScript
calcPoints
Brbb/graphql-rover · js/utils.js:83
function calcPoints(e) {
var edge = g.edge(e.v, e.w),
tail = g.node(e.v),
head = g.node(e.w);
var points = edge.points.slice(1, edge.points.length - 1);
var afterslice = edge.points.slice(1, edge.points.length - 1)
points.unshift(intersectRect(tail, points[0]));
points.push(intersectRect(head, points[points.length - 1]));
return d3.svg.line()
.x(function (d) {
return d.x;
})
.y(function (d) {
return d.y;
})
.interpolate("basis")
(points);
}