Style your connection since version 4.3.0

Since the version 4.3.0 it is possible to style your connection with a outline color and stroke. Additional the ‚radius‘ attribute is applied to a connection as well. Looks very smooth..

The code below override the standard method of draw2d for connection creation for this.

// Override the default implementation of connection creation with your own method
//
draw2d.Connection.createConnection=function(sourcePort, targetPort, callback, dropTarget){
    
    var conn= new draw2d.Connection();
    conn.setRouter(new draw2d.layout.connection.InteractiveManhattanConnectionRouter());
    conn.setOutlineStroke(1);
    conn.setOutlineColor("#303030");
    conn.setStroke(5);
    conn.setColor('#00A8F0');
    conn.setRadius(20);
    return conn;
};


blogEntryTopper