Skip to content

Commit 991ac15

Browse files
committed
render horizontal bar below highlighted line for "return" events
1 parent fafe494 commit 991ac15

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎PyTutorGAE/js/pytutor.js‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,13 +805,23 @@ ExecutionVisualizer.prototype.updateOutput = function() {
805805
return d.backgroundColor;
806806
})
807807
.style('border-top', function(d) {
808-
if ((d.lineNumber == curEntry.line) && !hasError && !isTerminated) {
808+
if ((d.lineNumber == curEntry.line) &&
809+
(curEntry.event != 'return') &&
810+
!hasError && !isTerminated) {
809811
return '1px solid ' + highlightedLineTopBorderColor;
810812
}
811813
else {
812814
// put a default white top border to keep space usage consistent
813815
return '1px solid #ffffff';
814816
}
817+
})
818+
.style('border-bottom', function(d) {
819+
// special case to render horizontal bar *BELOW* the highlighted line
820+
if ((d.lineNumber == curEntry.line) &&
821+
(curEntry.event == 'return') &&
822+
!hasError && !isTerminated) {
823+
return '1px solid ' + highlightedLineTopBorderColor;
824+
}
815825
});
816826

817827

0 commit comments

Comments
 (0)