var c = this.ctx 
var c = this.canvas.getContext("2d"); 
    redraw : function () {        if ( ! this.canvas ) {            this.canvas = document.createElement( "canvas" );            $("body").append( this.canvas );            if ( this.dragging ) { this.canvas.style.zIndex = "300" }            this.ctx = this.canvas.getContext("2d");        }        // Find the position of each handle        var o = $(this.handle1.element).offset();        var start_x = o.left + 5;        var start_y = o.top + 5;        var o = $(this.handle2.element).offset();        var end_x = o.left + 5;        var end_y = o.top + 5;        // Calculate canvas area        var canvas_extra = 100;        var canvas_min_x = Math.min( start_x, end_x );        var canvas_max_x = Math.max( start_x, end_x );        var canvas_min_y = Math.min( start_y, end_y );        var canvas_max_y = Math.max( start_y, end_y );        var cp_shift = Math.min( Math.max( Math.abs( canvas_max_y - canvas_min_y ) / 2, 100 ), 300 );        var canvas_left = canvas_min_x - canvas_extra;        var canvas_top = canvas_min_y - canvas_extra;        var canvas_width = canvas_max_x - canvas_min_x + 2 * canvas_extra;        var canvas_height = canvas_max_y - canvas_min_y + 2 * canvas_extra;        // Place the canvas        this.canvas.style.left = canvas_left + "px";        this.canvas.style.top = canvas_top + "px";        this.canvas.setAttribute( "width", canvas_width );        this.canvas.setAttribute( "height", canvas_height );        // Adjust points to be relative to the canvas        start_x -= canvas_left;        start_y -= canvas_top;        end_x -= canvas_left;        end_y -= canvas_top;        // Draw the line        var c = this.ctx        c.lineCap = "round";        c.strokeStyle = "#999";        c.lineWidth = 7;        c.beginPath();        c.moveTo( start_x, start_y );        c.bezierCurveTo( start_x + cp_shift, start_y, end_x - cp_shift, end_y, end_x, end_y );        c.stroke();        // Inner line        c.strokeStyle = this.inner_color;        c.lineWidth = 5;        c.beginPath();        c.moveTo( start_x, start_y );        c.bezierCurveTo( start_x + cp_shift, start_y, end_x - cp_shift, end_y, end_x, end_y );        c.stroke();    }
10252	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10252/6f32d29ec7c64ff8e48384959df7a633a16fb899/galaxy.workflow_editor.canvas.js/buggy/static/scripts/galaxy.workflow_editor.canvas.js