allow chaining on container in display method

This commit is contained in:
Aurélien Delobelle 2017-03-26 14:51:16 +02:00
parent 485ae86a42
commit b81b33c056

View file

@ -164,10 +164,12 @@ class ModelObject {
* @param {Formatters.Formatter}
* [formatter={@link Models.ModelObject#formatter|this.formatter()}]
* Formatter class to use.
* @return {jQuery} The DOM element $container, allowing methods chaining.
*/
display($container, options, formatter) {
formatter = formatter || this.formatter();
formatter.render(this, $container, options);
return $container;
}
}