mariusnita/ecostem — pull request #30 by bennlich (2014-03-13 23:41:33+00:00)
Title: First pass at using requirejs for model dependencies.

DataModel:
* constructor takes no arguments -- use init() to initialize dimensions
* models should implement a defaultValue object, which is used during init() and reset()
* prototype now includes a reset() function

EcostemServices.map:
* _makeDataLayers is now async, since it loads ModelSet lazily

Models + ModelSet:
* Are now all require.js modules
* Models automatically return an instance of themselves, instead of their constructor
* ModelSet initializes all models (as opposed to calling their constructors)

TransferFunction/StackedBars:
* Width and height of canvas element is now set in html, which makes it easier to find programmatically when initializing ui elements