Skip to content

Commit 54586a8

Browse files
committed
Merge pull request #49 from cemc/davesept
Same as before but leave the numbers alone
2 parents fb67a2d + 823fa5d commit 54586a8

3 files changed

Lines changed: 8 additions & 24 deletions

File tree

‎v3/css/pytutor.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ div.ExecutionVisualizer .highlight-prev {
703703
background-color: #F0F0EA;
704704
}
705705

706-
div.ExecutionVisualizer .highlight-curr {
706+
div.ExecutionVisualizer .highlight-cur {
707707
background-color: #FFFF66;
708708
}
709709

‎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

‎v3/js/pytutor.js‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -171,26 +171,6 @@ function ExecutionVisualizer(domRootID, dat, params) {
171171
this.params.arrowLines = this.params.highlightLines = false;
172172
}
173173

174-
// David's original logic ...
175-
/*
176-
if (!this.params.arrowLines && !this.params.highlightLines) {
177-
this.params.highlightLines = false;
178-
this.params.arrowLines = true;
179-
}
180-
else if (this.params.arrowLines) {
181-
this.params.arrowLines = (this.params.arrowLines == true);
182-
this.params.highlightLines = !(this.params.arrowLines);
183-
}
184-
else if (this.params.highlightLines) {
185-
this.params.highlightLines = (this.params.highlightLines == true);
186-
this.params.arrowLines = !(this.params.highlightLines);
187-
}
188-
else {
189-
this.params.arrowLines = (this.params.arrowLines == true);
190-
this.params.highlightLines = (this.params.highlightLines == true);
191-
}
192-
*/
193-
194174
// needs to be unique!
195175
this.visualizerID = curVisualizerID;
196176
curVisualizerID++;

0 commit comments

Comments
 (0)