Skip to content

Commit 93cacf7

Browse files
author
Philip Guo
committed
subtle bugfix so that jsPlumb connectors will render properly on first frame
1 parent 7a7e2c9 commit 93cacf7

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎edu-python-questions.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,17 @@ reverse(input)\n";
7575
{user_script : submittedCode},
7676
function(traceData) {
7777
renderPyCodeOutput(submittedCode);
78-
processTrace(traceData, true);
7978

8079
$("#pyInputPane").hide();
8180
$("#pyOutputPane").show();
8281
appMode = 'visualize';
8382

8483
$('#executeBtn').html("Visualize execution");
8584
$('#executeBtn').attr('disabled', false);
85+
86+
// do this AFTER making #pyOutputPane visible, or else
87+
// jsPlumb connectors won't render properly
88+
processTrace(traceData, true);
8689
},
8790
"json");
8891
});

‎edu-python-tutor.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,17 @@ $(document).ready(function() {
4343
{user_script : $("#pyInput").val()},
4444
function(traceData) {
4545
renderPyCodeOutput($("#pyInput").val());
46-
processTrace(traceData, false);
4746

4847
$("#pyInputPane").hide();
4948
$("#pyOutputPane").show();
5049
appMode = 'visualize';
5150

5251
$('#executeBtn').html("Visualize execution");
5352
$('#executeBtn').attr('disabled', false);
53+
54+
// do this AFTER making #pyOutputPane visible, or else
55+
// jsPlumb connectors won't render properly
56+
processTrace(traceData, false);
5457
},
5558
"json");
5659
});

‎question.html‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@
101101
<div id="editCodeLinkDiv">
102102

103103
<button id="editBtn" class="medBtn" type="button">Edit code</button>
104+
<span style="margin-left: 7px;"/>
105+
<button id="submitBtn" class="medBtn" type="button">Submit answer</button>
104106

105107
</div>
106108

0 commit comments

Comments
 (0)