phlsa / gmynd-old

A toolkit that makes creating graphics easy
2 stars 0 forks source link

Removing shapes and collections #13

Closed bohnacker closed 11 years ago

bohnacker commented 11 years ago

What would be the right way to remove elements? Using jQuery remove() and setting the variable to null?

Could we add a remove-function?

phlsa commented 11 years ago

You could use myRect.elem.remove(). The user shouldn't need to bother with the elem though, so it would be good to have a myRect.remove() function.

Any variable can be deleted by either using delete or setting it to undefinded. I've read that neither is good practice in JS and variables should just go out of scope and be garbage collected.

I think a remove()-Method for shapes would be sufficient.

phlsa commented 11 years ago

Fixed in 7ccc042b7006c641e0079e10b98e2bde1b52de16