3

I want to provide an ID to a SET object. Any idea how to do it

0

1 Answer 1

2

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 ....

2
  • 1
    Setting 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..
    – Knight
    Aug 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() ....
    – Aukhan
    Aug 9, 2012 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.