mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-13 13:17:50 +08:00
Cherry pick of @jasongrout 's 2bc2f96.
Only merged changes to notebook and kernel... (see original comment below). Separate the widget registry from the widget managers; attach widget managers to kernels. Yet to do: take care of clean-up when a kernel is deleted Conflicts: IPython/html/static/notebook/js/widgetmanager.js IPython/html/static/notebook/js/widgets/widget.js
This commit is contained in:
parent
140d1872f7
commit
6871c8f9e0
@ -1315,7 +1315,6 @@ var IPython = (function (IPython) {
|
||||
*/
|
||||
Notebook.prototype._session_started = function(){
|
||||
this.kernel = this.session.kernel;
|
||||
IPython.widget_manager.attach_comm_manager(this.kernel.comm_manager);
|
||||
var ncells = this.ncells();
|
||||
for (var i=0; i<ncells; i++) {
|
||||
var cell = this.get_cell(i);
|
||||
|
@ -47,6 +47,9 @@ var IPython = (function (IPython) {
|
||||
this.bind_events();
|
||||
this.init_iopub_handlers();
|
||||
this.comm_manager = new IPython.CommManager(this);
|
||||
// TODO: make the comm manager an arg to the widget manager initialization
|
||||
this.widget_manager = new IPython.WidgetManager();
|
||||
this.widget_manager.attach_comm_manager(this.comm_manager);
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user