Commit Graph

7 Commits

Author SHA1 Message Date
Nathan Sobo
e192922f0e Don’t add __spacePenView property to jQuery objects in ViewRegistry
This property is added as needed in our legacy SpacePen views, and is
now used to trigger a deprecation warning. We don’t want to add it to
new SpacePen views because they shouldn’t trigger deprecation warnings.
2015-01-02 12:58:49 -07:00
Nathan Sobo
9a9347e3a5 Simplify ViewRegistry::addViewProvider API
It now takes two arguments, a model constructor and a create view
callback that is passed the model.

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2014-12-01 17:53:03 -08:00
Nathan Sobo
d344adc21e Allow view providers to specify a createView factory method
If present, it will be called with the model object instead of
instantiating the view constructor directly and assigning a model on it.
This gives users more flexibility when constructing views.
2014-09-19 16:24:13 -06:00
Nathan Sobo
74d772f069 Rename view/modelClass to view/modelConstructor in view provider specs
It’s a more technically correct term. You use a class keyword to declare
these things, but the actual objects you pass around to talk about them
are constructor functions.
2014-09-19 16:24:13 -06:00
Nathan Sobo
e2e804483f Return disposable from ViewRegistry::addViewProvider 2014-09-19 16:24:13 -06:00
Nathan Sobo
b5499247b3 Use view providers to build views if a matching provider is available 2014-09-19 16:24:13 -06:00
Nathan Sobo
54378b11d4 Isolate ViewRegistry specs 2014-09-19 16:24:12 -06:00