raphael icon indicating copy to clipboard operation
raphael copied to clipboard

set.remove() leaves element handles in the collection

Open jbreckmckye opened this issue 9 years ago • 1 comments

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

jbreckmckye avatar Apr 19 '15 22:04 jbreckmckye

I have same problem~~help !

chaims avatar Sep 04 '18 23:09 chaims