dist/joint.nowrap.js
function freeJoin(p1, p2, bbox) {

        var p = new g.Point(p1.x, p2.y);
        if (bbox.containsPoint(p)) p = new g.Point(p2.x, p1.y);
        // kept for reference
        // if (bbox.containsPoint(p)) p = null;

        return p;
    }
function freeJoin(p1, p2, bbox) {

        var p = new g.Point(p1.x, p2.y);
        if (bbox.containsPoint(p)) p = new g.Point(p2.x, p1.y);
        // kept for reference
        // if (bbox.containsPoint(p)) p = null;

        return p;
    }
function freeJoin ( p1 , p2 , bbox ) { var p = new g . Point ( p1 . x , p2 . y ) ; if ( bbox . containsPoint ( p ) ) p = new g . Point ( p2 . x , p1 . y ) ; // kept for reference // if (bbox.containsPoint(p)) p = null; return p ; }
returns a point `p` where lines p,p1 and p,p2 are perpendicular and p is not contained in the given box
returns a point p where lines p p1 and p p2 are perpendicular and p is not contained in the given box