javascript - RaphaelJS - Get all elements -


i starting painting application raphaeljs. what's best way of keeping track of elements have been drawn on paper (with mouse)?

the first way thought of append drawn elements array, might not efficient if there 'out of box' solution raphaeljs had.

i checked api didn't find looking for... out of luck?

i guess depends mean when "keeping track."

you're able loop elements on given paper using paper.foreach , you're able pull out specific elements using paper.getbyid.

if you're drawing elements paper.path , set id can store in separate data structure using method described in this thread.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -