mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Preserve layout for large isolated objects
This commit is contained in:
parent
b1eba452c9
commit
fcbd398ad2
@ -334,8 +334,9 @@ var IPython = (function (IPython) {
|
||||
if (md['isolated']) {
|
||||
// Create an iframe to isolate the subarea from the rest of the
|
||||
// document
|
||||
var iframe = $('<iframe/>');
|
||||
var iframe = $('<iframe/>').addClass('box-flex1');
|
||||
iframe.attr('height', 1);
|
||||
iframe.css({'width':'100%', 'display':'block'});
|
||||
iframe.attr('frameborder', 0);
|
||||
iframe.attr('scrolling', 'auto');
|
||||
|
||||
@ -355,8 +356,7 @@ var IPython = (function (IPython) {
|
||||
this.contentDocument.close();
|
||||
|
||||
var body = this.contentDocument.body;
|
||||
// Adjust the iframe width and height
|
||||
iframe.width(body.scrollWidth + 'px');
|
||||
// Adjust the iframe height automatically
|
||||
iframe.height(body.scrollHeight + 'px');
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user