I have created a polygon using raphael path. The vertices of the polygon can be dragged to stretched to change the shape/size of the polygon.
The test is running here
Now what I want to implement is that if I dblclick on the edge, it should create a new vertex. So that it can act as a dragging point.
Can anyone help me out on identifying the position of a point in the path:
var p = r.path("M100,300L100,100L250,300z");
and if a mouse event happens on 200,250, how to identify where in the path array, should the new point command fit?
var p = r.path("M100,300L200,250L100,100L250,300z");
OR
var p = r.path("M100,300L100,100L200,250L250,300z");