diff --git a/IPython/html/static/notebook/js/widgetmanager.js b/IPython/html/static/notebook/js/widgetmanager.js index 3612ae1..abea5e9 100644 --- a/IPython/html/static/notebook/js/widgetmanager.js +++ b/IPython/html/static/notebook/js/widgetmanager.js @@ -112,7 +112,8 @@ var ViewType = this._view_types[view_name]; >>>>>>> _model_types, _view_types, _models - and document what keys and values are if (ViewType !== undefined && ViewType !== null) { - var view = new ViewType({model: model, widget_manager: this, options: options}); + var parameters = {model: model, options: options}; + var view = new ViewType(parameters); view.render(); model.views.push(view); model.on('destroy', view.remove, view); diff --git a/IPython/html/static/notebook/js/widgets/widget.js b/IPython/html/static/notebook/js/widgets/widget.js index 382a650..c4df7ee 100644 --- a/IPython/html/static/notebook/js/widgets/widget.js +++ b/IPython/html/static/notebook/js/widgets/widget.js @@ -184,11 +184,9 @@ function(widget_manager, underscore, backbone){ // WidgetView class //-------------------------------------------------------------------- var WidgetView = Backbone.View.extend({ - initialize: function(options) { + initialize: function(parameters) { this.model.on('change',this.update,this); - this.widget_manager = options.widget_manager; - this.comm_manager = options.widget_manager.comm_manager; - this.options = options.options; + this.options = parameters.options; this.child_views = []; this.model.views.push(this); },