raphael
raphael copied to clipboard
set.remove() leaves element handles in the collection
I have noticed an unusual behaviour; I'm not sure if it's a bug, if the documentation is ambiguous, or if I've simply misunderstood something.
When I create a set and fill it with text elements (I don't know if other element types have the same behaviour), then use the .remove() method, the elements are cleared from the canvas as expected. However, the set still contains the elements.
If I use the .clear() method, I have the opposite issue: handles to the elements are removed from the set, but they remain on-screen.
Is this the expected behaviour?
I have tested this in Raphael 2.1.4. I can check and see if this behaviour is consistent in other versions.
Regards, JBMK
I have same problem~~help !