From e2c20e0675fcbc6ccfff3c24f016fafe70815a55 Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Thu, 30 Jan 2014 13:44:31 -0800 Subject: [PATCH] Rename _handle_new_view->_handle_display_view. --- .../html/static/notebook/js/widgetmanager.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/IPython/html/static/notebook/js/widgetmanager.js b/IPython/html/static/notebook/js/widgetmanager.js index b5c7e35c4..afd8f3fd4 100644 --- a/IPython/html/static/notebook/js/widgetmanager.js +++ b/IPython/html/static/notebook/js/widgetmanager.js @@ -83,17 +83,20 @@ console.error("View creation failed", model); } if (cell.widget_subarea) { - cell.widget_area.show(); - // Have the IPython keyboard manager disable its event - // handling so the widget can capture keyboard input. - // Note, this is only done on the outer most widget. - IPython.keyboard_manager.register_events(view.$el); + 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 + // handling so the widget can capture keyboard input. + // Note, this is only done on the outer most widget. + IPython.keyboard_manager.register_events(view.$el); + }; + WidgetManager.prototype.create_view = function(model, options, view) { // Creates a view for a particular model. var view_name = model.get('_view_name'); @@ -113,17 +116,11 @@ view.render(); model.views.push(view); model.on('destroy', view.remove, view); - - this._handle_new_view(view); return view; } 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) { var cell = null; // First, check to see if the msg was triggered by cell execution.