Finding an item in an array |
The most interesting code in the program is the one to determine if the point clicked is inside any of the objects. See getIndexOf. Notice that if point is in several elements, selected will only refer to the last of these.
Finding an item in an array |