Skip to content

Commit bafc9f0

Browse files
committed
fix several bugs with height resizing
1 parent 45d8cb0 commit bafc9f0

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎v3/js/iframe-embed.js‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ $(document).ready(function() {
100100
var container = findContainer();
101101

102102
function resizeContainerNow() {
103-
$(container).height($("#vizDiv").height()+20);
103+
$(container).height($("html").height());
104104
};
105105
}
106106

@@ -120,7 +120,7 @@ $(document).ready(function() {
120120
textualMemoryLabels: textRefsBool,
121121
showOnlyOutputs: showOnlyOutputsBool,
122122
executeCodeWithRawInputFunc: executeCodeWithRawInput,
123-
updateOutputCallback: (resizeContainer ? resizeContainerNow : null),
123+
heightChangeCallback: (resizeContainer ? resizeContainerNow : NOP),
124124

125125
// undocumented experimental modes:
126126
pyCrazyMode: (pyState == '2crazy'),
@@ -137,7 +137,11 @@ $(document).ready(function() {
137137
backend_script, backendOptionsObj,
138138
frontendOptionsObj,
139139
'vizDiv',
140-
NOP, NOP);
140+
function() { // success
141+
if (resizeContainer)
142+
resizeContainerNow();
143+
},
144+
NOP);
141145
}
142146

143147

0 commit comments

Comments
 (0)