Show More
@@ -291,8 +291,10 var IPython = (function (IPython) { | |||||
291 | this.expand(); |
|
291 | this.expand(); | |
292 |
|
292 | |||
293 | // Clear the output if clear is queued. |
|
293 | // Clear the output if clear is queued. | |
|
294 | var needs_height_reset = false; | |||
294 | if (this.clear_queued) { |
|
295 | if (this.clear_queued) { | |
295 | this.clear_output(false); |
|
296 | this.clear_output(false); | |
|
297 | needs_height_reset = true; | |||
296 | } |
|
298 | } | |
297 |
|
299 | |||
298 | if (json.output_type === 'pyout') { |
|
300 | if (json.output_type === 'pyout') { | |
@@ -305,7 +307,13 var IPython = (function (IPython) { | |||||
305 | this.append_stream(json); |
|
307 | this.append_stream(json); | |
306 | } |
|
308 | } | |
307 | this.outputs.push(json); |
|
309 | this.outputs.push(json); | |
308 | this.element.height('auto'); |
|
310 | ||
|
311 | // Only reset the height to automatic if the height is currently | |||
|
312 | // fixed (done by wait=True flag on clear_output). | |||
|
313 | if (needs_height_reset) { | |||
|
314 | this.element.height('auto'); | |||
|
315 | } | |||
|
316 | ||||
309 | var that = this; |
|
317 | var that = this; | |
310 | setTimeout(function(){that.element.trigger('resize');}, 100); |
|
318 | setTimeout(function(){that.element.trigger('resize');}, 100); | |
311 | }; |
|
319 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now