##// END OF EJS Templates
Fixed & separated output_area -> widget_area logic
Jonathan Frederic -
Show More
@@ -218,9 +218,8 b' define(["components/underscore/underscore-min",'
218 218 // element to cell's widget div.
219 219 var view = this._create_view(view_name, output_area);
220 220 new_views.push(view);
221 output_area.element.find('.widget-area').find('.widget-subarea')
222 .append(view.$el)
223 .parent().show(); // Show the widget_area (parent of widget_subarea)
221 this._get_widget_area_element(output_area, true)
222 .append(view.$el);
224 223
225 224 }
226 225
@@ -289,9 +288,8 b' define(["components/underscore/underscore-min",'
289 288 },
290 289
291 290
292 // Get the cell index corresponding to the msg_id.
293 // output_area is a JQuery DOM element handle that has widget_area
294 // and nested widget_subarea elements.
291 // Get the output area corresponding to the msg_id.
292 // output_area is an instance of
295 293 _get_output_area: function (msg_id) {
296 294
297 295 // First, guess cell.execute triggered
@@ -316,6 +314,17 b' define(["components/underscore/underscore-min",'
316 314 return null;
317 315 },
318 316
317 // Gets widget output area (as a JQuery element) from the
318 // output_area (Ipython.OutputArea instance)
319 _get_widget_area_element: function (output_area, show) {
320 var widget_area = output_area.element
321 .parent() // output_wrapper
322 .parent() // cell
323 .find('.widget-area');
324 if (show) { widget_area.show(); }
325 return widget_area.find('.widget-subarea');
326 },
327
319 328 });
320 329
321 330
General Comments 0
You need to be logged in to leave comments. Login now