model.call()
As a convenient way to invoke mixins, the function model.call(fn)
has been added (see #17 ). Similarly to call() in d3-selection, the given function will be invoked, passing the model as an argument. This makes it convenient to invoke mixins and use method chaining, like this:
my
.call(ReactiveSVG)
.call(ReactiveMargin);
As an example of this, see Margin Convention II with ReactiveModel.