Skip to content

Commit b61d7f2

Browse files
author
Philip Guo
committed
sorta works now
1 parent ef1d084 commit b61d7f2

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

PyTutorGAE/js/pytutor.js

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,6 @@ ExecutionVisualizer.prototype.renderDataStructures = function() {
15961596
stackVarTable
15971597
.enter()
15981598
.append('tr')
1599-
16001599

16011600
var stackVarTableCells = stackVarTable
16021601
.selectAll('td')
@@ -1609,12 +1608,29 @@ ExecutionVisualizer.prototype.renderDataStructures = function() {
16091608
.html(function(d, i) {
16101609
var varname = d[0];
16111610
var frame = d[1];
1612-
return varname;
1611+
if (i == 0) {
1612+
return varname;
1613+
}
1614+
else {
1615+
return frame.encoded_locals[varname];
1616+
}
16131617
});
16141618

1619+
stackVarTableCells.exit().remove();
1620+
16151621
stackVarTable.exit().remove();
16161622

16171623

1624+
// I suspect I need to use .order() somewhere, but I can't seem to get it in the right place :(
1625+
stackFrameDiv
1626+
.each(function(frame, i) {
1627+
console.log('UPDATE stackFrameDiv', frame.unique_hash, i);
1628+
})
1629+
1630+
stackFrameDiv.exit().remove();
1631+
1632+
1633+
16181634
/*
16191635
stackFrameDiv.select('div')
16201636
.data(function
@@ -1643,15 +1659,6 @@ ExecutionVisualizer.prototype.renderDataStructures = function() {
16431659
*/
16441660

16451661

1646-
// I suspect I need to use .order() somewhere, but I can't seem to get it in the right place :(
1647-
stackFrameDiv
1648-
.each(function(frame, i) {
1649-
console.log('UPDATE stackFrameDiv', frame.unique_hash, i);
1650-
})
1651-
1652-
stackFrameDiv.exit().remove();
1653-
1654-
16551662

16561663
function renderStackFrame(frame, ind, is_zombie) {
16571664
var funcName = htmlspecialchars(frame.func_name); // might contain '<' or '>' for weird names like <genexpr>

0 commit comments

Comments
 (0)