I use jQuery.click to handle the mouse click event on Raphael graph, meanwhile, I need to handle mouse drag event, mouse drag consists of mousedown, mouseupand mousemove in Raphael.
It is difficult to distinguish click and drag because click also contain mousedown & mouseup, How can I distinguish mouse “click” & mouse “drag” then in Javascript?
I think the difference is that there is a
mousemovebetweenmousedownandmouseupin a drag, but not in a click.You can do something like this: