INNER CODE UNIT · JavaScript

points

Brbb/graphql-rover · js/utils.js:87

        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);
    }

    //taken from dagre-d3 source code (not the exact same)
    function intersectRect(node, point) {
        var x = node.x;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…