petermichaux / maria

The MVC framework for JavaScript applications. The real MVC. The Smalltalk MVC. The Gang of Four MVC.
BSD 2-Clause "Simplified" License
765 stars 51 forks source link

set models do not need to observe each element for delete #42

Open petermichaux opened 11 years ago

petermichaux commented 11 years ago

Events bubble. A set model can observe itself for bubbling destroy events. Then check if the original target is a member of the set (not bubbling from deeper in the tree) and remove the item. This will be much simpler than adding and removing destroy listeners on each element in the set.

Same for maria-NodModel plugin.