I want to provide an ID to a SET object. Any idea how to do it
1 Answer
In my knowledge there is only one way .... extend the Raphael.st
Raphael.st.setID = function(id){
this.id = id;
}
var yourset = paper.set();
yourset.setID(id); //give the id you want
then try -> yourset.id;
I hope it works for you ....
-
1Setting of ID works. I have few elements in the Set. I want to hide some elements by accessing the Set with ID. at present that is not happening. I know that Paper.getById(yourset.id) wont returns the Set. How can i access the elements inside a set by using its ID..– KnightAug 9, 2012 at 4:21
-
The raphael set is actually an extension of the array .... access elements of a set like an array i.e. set[0],set[1],set[2] .... apply native array functions like splice() etc and extended functions from Raphael like exclude() ....– AukhanAug 9, 2012 at 19:00