Skip to content

Commit cc8b3e2

Browse files
committed
draw pointers in tabular view
1 parent 702fbae commit cc8b3e2

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

v3/js/pytutor.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ function ExecutionVisualizer(domRootID, dat, params) {
196196
this.showOnlyOutputs = (this.params.showOnlyOutputs == true);
197197
this.tabularView = (this.params.tabularView == true);
198198

199+
//this.tabularView = true; // for testing only
200+
199201
this.executeCodeWithRawInputFunc = this.params.executeCodeWithRawInputFunc;
200202

201203
// cool, we can create a separate jsPlumb instance for each visualization:
@@ -2880,7 +2882,6 @@ ExecutionVisualizer.prototype.renderTabularView = function() {
28802882
allVarNames.push(funcName + ':' + v);
28812883
});
28822884
});
2883-
console.log(allVarNames);
28842885

28852886
// get the values of all objects in trace entry e
28862887
function getAllOrderedValues(curEntry) {
@@ -2963,6 +2964,18 @@ ExecutionVisualizer.prototype.renderTabularView = function() {
29632964
myViz.renderNestedObject(obj, step, $(this), 'tabular');
29642965
}
29652966
});
2967+
2968+
2969+
myViz.jsPlumbInstance.reset();
2970+
2971+
function renderTableVarValueConnector(varID, valueID) {
2972+
myViz.jsPlumbInstance.connect({source: varID, target: valueID,
2973+
scope: 'varValuePointer',
2974+
// make it look more aesthetically pleasing:
2975+
anchors: ['TopCenter', 'LeftMiddle']});
2976+
}
2977+
2978+
myViz.jsPlumbManager.connectionEndpointIDs.forEach(renderTableVarValueConnector);
29662979
}
29672980

29682981

0 commit comments

Comments
 (0)