@@ -153,11 +153,15 @@ $(document).ready(function() {
153153 $ ( "#embedLinkDiv" ) . hide ( ) ;
154154
155155
156+ // set up all options in a JS object
157+ var options = { cumulative_mode : ( $ ( '#cumulativeModeSelector' ) . val ( ) == 'true' ) ,
158+ heap_primitives : ( $ ( '#heapPrimitivesSelector' ) . val ( ) == 'true' ) ,
159+ show_only_outputs : ( $ ( '#showOnlyOutputsSelector' ) . val ( ) == 'true' ) } ;
160+
156161 $ . get ( backend_script ,
157162 { user_script : pyInputCodeMirror . getValue ( ) ,
158163 raw_input_json : rawInputLst . length > 0 ? JSON . stringify ( rawInputLst ) : '' ,
159- cumulative_mode : $ ( '#cumulativeModeSelector' ) . val ( ) ,
160- heap_primitives : $ ( '#heapPrimitivesSelector' ) . val ( ) } ,
164+ options_json : JSON . stringify ( options ) } ,
161165 function ( dataFromBackend ) {
162166 var trace = dataFromBackend . trace ;
163167
@@ -214,6 +218,7 @@ $(document).ready(function() {
214218 disableHeapNesting : ( $ ( '#heapPrimitivesSelector' ) . val ( ) == 'true' ) ,
215219 drawParentPointers : ( $ ( '#drawParentPointerSelector' ) . val ( ) == 'true' ) ,
216220 textualMemoryLabels : ( $ ( '#textualMemoryLabelsSelector' ) . val ( ) == 'true' ) ,
221+ showOnlyOutputs : ( $ ( '#showOnlyOutputsSelector' ) . val ( ) == 'true' ) ,
217222 executeCodeWithRawInputFunc : executeCodeWithRawInput ,
218223 //allowEditAnnotations: true,
219224 } ) ;
@@ -526,6 +531,11 @@ $(document).ready(function() {
526531 if ( textRefsState !== undefined ) {
527532 $ ( '#textualMemoryLabelsSelector' ) . val ( textRefsState ) ;
528533 }
534+ var showOnlyOutputsState = $ . bbq . getState ( 'showOnlyOutputs' ) ;
535+ if ( showOnlyOutputsState !== undefined ) {
536+ $ ( '#showOnlyOutputsSelector' ) . val ( showOnlyOutputsState ) ;
537+ }
538+
529539 var pyState = $ . bbq . getState ( 'py' ) ;
530540 if ( pyState !== undefined ) {
531541 $ ( '#pythonVersionSelector' ) . val ( pyState ) ;
@@ -572,6 +582,7 @@ $(document).ready(function() {
572582 heapPrimitives : $ ( '#heapPrimitivesSelector' ) . val ( ) ,
573583 drawParentPointers : $ ( '#drawParentPointerSelector' ) . val ( ) ,
574584 textReferences : $ ( '#textualMemoryLabelsSelector' ) . val ( ) ,
585+ showOnlyOutputs : $ ( '#showOnlyOutputsSelector' ) . val ( ) ,
575586 py : $ ( '#pythonVersionSelector' ) . val ( ) } ;
576587
577588 if ( appMode == 'display' ) {
@@ -590,6 +601,7 @@ $(document).ready(function() {
590601 heapPrimitives : $ ( '#heapPrimitivesSelector' ) . val ( ) ,
591602 drawParentPointers : $ ( '#drawParentPointerSelector' ) . val ( ) ,
592603 textReferences : $ ( '#textualMemoryLabelsSelector' ) . val ( ) ,
604+ showOnlyOutputs : $ ( '#showOnlyOutputsSelector' ) . val ( ) ,
593605 py : $ ( '#pythonVersionSelector' ) . val ( ) ,
594606 curInstr : myVisualizer . curInstr ,
595607 } ;
0 commit comments