mozilla/openbadges-discovery — pull request #152 by stenington (2014-03-20 19:46:06+00:00)
Title: Refactor the editor to use backbone conventions

Refactor of the editor module to make it make more sense.

This separates the building of the scene graph from the size-and-column-count constrained task of laying out the visual elements more clearly, and allows the graph to be re-layed out on demand.

It also now assumes the incoming pathway requirements operate like a Backbone collection in terms of basic events (`add` and `remove`) and updates the scene graph appropriately. No more "wipe everything and start over" approach! I also made the editor extend Backbone.View just because I'm getting used to the associated conventions and felt it helped organize the code. `editor.js` is still in the modules folder though because it should continue to operate as a fairly stand-alone thing if possible.

Additionally, the editor example page shows off the add/remove functionality.