Skip to content

Commit 716251e

Browse files
author
Philip Guo
committed
added stub
1 parent 7efb588 commit 716251e

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

‎v3/js/opt-frontend.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ $(document).ready(function() {
197197
dataFromBackend,
198198
{startingInstruction: startingInstruction,
199199
updateOutputCallback: function() {$('#urlOutput,#embedCodeOutput').val('');},
200+
disableHeapNesting: $('#heapPrimitivesSelector').val(),
200201
//allowEditAnnotations: true,
201202
});
202203

‎v3/js/pytutor.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ var curVisualizerID = 1; // global to uniquely identify each ExecutionVisualizer
7878
// editCodeBaseURL - the base URL to visit when the user clicks 'Edit code' (if null, then 'Edit code' link hidden)
7979
// allowEditAnnotations - allow user to edit per-step annotations (default: false)
8080
// embeddedMode - shortcut for hideOutput=true, allowEditAnnotations=false
81+
// disableHeapNesting - if true, then render all heap objects at the top level (i.e., no nested objects)
8182
// codeDivWidth=350, codeDivHeight=400
8283
// updateOutputCallback - function to call (with 'this' as parameter)
8384
// whenever this.updateOutput() is called
@@ -114,6 +115,7 @@ function ExecutionVisualizer(domRootID, dat, params) {
114115
this.arrowOffsetY = undefined;
115116
this.codeRowHeight = undefined;
116117

118+
this.disableHeapNesting = (this.params.disableHeapNesting == true); // avoid 'undefined' state
117119

118120
// cool, we can create a separate jsPlumb instance for each visualization:
119121
this.jsPlumbInstance = jsPlumb.getInstance({

0 commit comments

Comments
 (0)