如何使用Raphael.JS根据鼠标移动绘制线

问题描述:

我正在尝试在纸上画一条线以及鼠标移动.我只知道如何使用path画一条线.但是想知道是否有人想与mousemove一起画一条线.请帮助我.

I am trying to draw a line along with mouse move on a paper. I just know how to draw a line using path. But wanted to know if anyone have ideas to make drawing a line along with mousemove. Please help me on this.

在此处使用拉斐尔(raphael)指向此类示例的链接

Here a link to such example using raphael

用Raphael绘图.效果如何...)

Drawing with Raphael.(Credit:Jonas). (click view->source to see how its done...)

和我以防万一的jsfiddle (just for back up)

它使用拖动

It uses the drag and mousemove events of raphael over a rectangle element...