Skip to content

Commit dde40fe

Browse files
author
Philip Guo
committed
the basics sorta work
1 parent 62c624a commit dde40fe

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

PyTutorGAE/js/pytutor.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1577,17 +1577,23 @@ ExecutionVisualizer.prototype.renderDataStructures = function() {
15771577
.data(curEntry.stack_to_render, function(frame, i) {
15781578
// use a frankenstein combination of frame identifiers and also the INDEX (stack position)
15791579
// as the join key, to properly handle closures and recursive calls of the same function
1580-
return frame.func_name + '_' + String(frame.is_zombie) + '_' + String(frame.frame_id) + '_' + String(frame.parent_frame_id_list) + '_' + i;
1580+
return frame.func_name + '_' + String(frame.frame_id) + '_' + String(frame.parent_frame_id_list) + '_' + String(frame.is_zombie) + '_' + i;
15811581
});
15821582

15831583
// ENTER - create a new stack frame div for each entry in curEntry.stack_to_render
15841584
stackD3.enter()
15851585
.append('div')
1586+
.each(function(frame, i) {
1587+
console.log('APPEND DIV', (frame.func_name + '_' + String(frame.frame_id) + '_' + String(frame.parent_frame_id_list) + '_' + i));
1588+
})
15861589
.attr('class', function(d, i) {return d.is_zombie ? 'zombieStackFrame' : 'stackFrame';})
15871590
.attr('id', function(d, i) {return d.is_zombie ? myViz.generateID("zombie_stack" + i) : myViz.generateID("stack" + i);})
15881591

1592+
/*
15891593
// UPDATE:
1590-
stackD3.append('div')
1594+
var stackFrameTable = stackD3
1595+
.order() // VERY IMPORTANT to put in the order corresponding to data elements
1596+
.append('div')
15911597
.attr('class', 'stackFrameHeader')
15921598
.attr('id', function(frame, i) {return frame.is_zombie ? myViz.generateID("zombie_stack_header" + i) : myViz.generateID("stack_header" + i);})
15931599
.html(function(frame, i) {
@@ -1607,10 +1613,7 @@ ExecutionVisualizer.prototype.renderDataStructures = function() {
16071613
16081614
return headerLabel;
16091615
});
1610-
1611-
1612-
// remember that the enter selection is added to the update
1613-
// selection so that we can process it later ...
1616+
*/
16141617

16151618
/*
16161619
var stackFrameTable = stackD3.order()

0 commit comments

Comments
 (0)