Skip to content

Commit 0cec72b

Browse files
author
Philip Guo
committed
more plumbing
1 parent 001e563 commit 0cec72b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

v3/js/opt-frontend.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,9 @@ $(document).ready(function() {
197197
dataFromBackend,
198198
{startingInstruction: startingInstruction,
199199
updateOutputCallback: function() {$('#urlOutput,#embedCodeOutput').val('');},
200-
// tricky: it's a string!
200+
// tricky: selector 'true' and 'false' values are strings!
201201
disableHeapNesting: ($('#heapPrimitivesSelector').val() == 'true'),
202+
drawParentPointers: ($('#drawParentPointerSelector').val() == 'true'),
202203
//allowEditAnnotations: true,
203204
});
204205

@@ -469,6 +470,7 @@ $(document).ready(function() {
469470
$("#aliasExampleLink").trigger('click');
470471
}
471472

473+
// parse query string options ...
472474
// ugh, ugly tristate due to the possibility of them being undefined
473475
var cumulativeState = $.bbq.getState('cumulative');
474476
if (cumulativeState !== undefined) {
@@ -478,6 +480,10 @@ $(document).ready(function() {
478480
if (heapPrimitivesState !== undefined) {
479481
$('#heapPrimitivesSelector').val(heapPrimitivesState);
480482
}
483+
var drawParentPointerState = $.bbq.getState('drawParentPointers');
484+
if (drawParentPointerState !== undefined) {
485+
$('#drawParentPointerSelector').val(drawParentPointerState);
486+
}
481487
var pyState = $.bbq.getState('py');
482488
if (pyState !== undefined) {
483489
$('#pythonVersionSelector').val(pyState);
@@ -522,6 +528,7 @@ $(document).ready(function() {
522528
mode: appMode,
523529
cumulative: $('#cumulativeModeSelector').val(),
524530
heapPrimitives: $('#heapPrimitivesSelector').val(),
531+
drawParentPointers: $('#drawParentPointerSelector').val(),
525532
py: $('#pythonVersionSelector').val()};
526533

527534
if (appMode == 'display') {
@@ -538,6 +545,7 @@ $(document).ready(function() {
538545
var myArgs = {code: pyInputCodeMirror.getValue(),
539546
cumulative: $('#cumulativeModeSelector').val(),
540547
heapPrimitives: $('#heapPrimitivesSelector').val(),
548+
drawParentPointers: $('#drawParentPointerSelector').val(),
541549
py: $('#pythonVersionSelector').val(),
542550
curInstr: myVisualizer.curInstr,
543551
};

0 commit comments

Comments
 (0)