Show More
@@ -218,9 +218,8 b' define(["components/underscore/underscore-min",' | |||||
218 | // element to cell's widget div. |
|
218 | // element to cell's widget div. | |
219 | var view = this._create_view(view_name, output_area); |
|
219 | var view = this._create_view(view_name, output_area); | |
220 | new_views.push(view); |
|
220 | new_views.push(view); | |
221 | output_area.element.find('.widget-area').find('.widget-subarea') |
|
221 | this._get_widget_area_element(output_area, true) | |
222 | .append(view.$el) |
|
222 | .append(view.$el); | |
223 | .parent().show(); // Show the widget_area (parent of widget_subarea) |
|
|||
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 |
|
291 | // Get the output area corresponding to the msg_id. | |
293 |
// output_area is a |
|
292 | // output_area is an instance of | |
294 | // and nested widget_subarea elements. |
|
|||
295 | _get_output_area: function (msg_id) { |
|
293 | _get_output_area: function (msg_id) { | |
296 |
|
294 | |||
297 | // First, guess cell.execute triggered |
|
295 | // First, guess cell.execute triggered | |
@@ -316,6 +314,17 b' define(["components/underscore/underscore-min",' | |||||
316 | return null; |
|
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