INNER CODE UNIT · JavaScript

afterslice

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

        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;
        var y = node.y;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…