Hello All,

The below Raphael.js code draws a line on mouse down and on mouse up. It works find but I would like to draw the line as the user drags the mouse. Any help will be greatly appreciated.
Code:
var StartEnd=new Array(); 

var paper = new Raphael(document.getElementById('holder'), 500, 500); 


$('#holder').mousedown(function(e) {



StartEnd[0]=e.offsetX;
StartEnd[1]=e.offsetY;
 

});



$('#holder').mouseup(function(e) {

StartEnd[2]=e.offsetX;
StartEnd[3]=e.offsetY;

var tetronimo = paper.path("M"+StartEnd[0]+","+StartEnd[1]+"L"+StartEnd[2]+","+StartEnd[3]).attr({fill: "#00000", stroke: "#000000"}); 

$('#holder').unbind('mousedown');

$('#holder').unbind('mouseup');

});