mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Rename _handle_new_view->_handle_display_view.
This commit is contained in:
parent
8c046fef99
commit
e2c20e0675
@ -83,15 +83,18 @@
|
|||||||
console.error("View creation failed", model);
|
console.error("View creation failed", model);
|
||||||
}
|
}
|
||||||
if (cell.widget_subarea) {
|
if (cell.widget_subarea) {
|
||||||
|
|
||||||
cell.widget_area.show();
|
cell.widget_area.show();
|
||||||
|
this._handle_display_view(view);
|
||||||
|
cell.widget_subarea.append(view.$el);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
WidgetManager.prototype._handle_display_view = function (view) {
|
||||||
// Have the IPython keyboard manager disable its event
|
// Have the IPython keyboard manager disable its event
|
||||||
// handling so the widget can capture keyboard input.
|
// handling so the widget can capture keyboard input.
|
||||||
// Note, this is only done on the outer most widget.
|
// Note, this is only done on the outer most widget.
|
||||||
IPython.keyboard_manager.register_events(view.$el);
|
IPython.keyboard_manager.register_events(view.$el);
|
||||||
cell.widget_subarea.append(view.$el);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
WidgetManager.prototype.create_view = function(model, options, view) {
|
WidgetManager.prototype.create_view = function(model, options, view) {
|
||||||
@ -113,17 +116,11 @@
|
|||||||
view.render();
|
view.render();
|
||||||
model.views.push(view);
|
model.views.push(view);
|
||||||
model.on('destroy', view.remove, view);
|
model.on('destroy', view.remove, view);
|
||||||
|
|
||||||
this._handle_new_view(view);
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
WidgetManager.prototype._handle_new_view = function (view) {
|
|
||||||
// Called when a view has been created and rendered.
|
|
||||||
};
|
|
||||||
|
|
||||||
WidgetManager.prototype.get_msg_cell = function (msg_id) {
|
WidgetManager.prototype.get_msg_cell = function (msg_id) {
|
||||||
var cell = null;
|
var cell = null;
|
||||||
// First, check to see if the msg was triggered by cell execution.
|
// First, check to see if the msg was triggered by cell execution.
|
||||||
|
Loading…
Reference in New Issue
Block a user