Raphael how to get last path and last circle, if i have 2 elements in the paper?
- by 3gwebtrain
I need to find the last path or circle in a paper, in order to perform further calculations to draw more elements, and calling 'paper.bottom' only gets the last element. Is there any way to get shapes of specific types, e.g. bottom.path, bottom.circle or traverse for the n'th child?
I want to avoid using jQuery selectors, as i can't retrieve any properties from those.
An example of a paper populated with shapes:
var paper = Raphael('paper',500,500);
var c1 = paper.circle(100,100,50)
var p1 = paper.path("M10 20l70 0")
var c2 = paper.circle(200,100,50)